diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-05-06 11:50:07 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-05-09 08:41:05 +0300 |
commit | f4088defa1d8de5b6d5060bfd2021a23f691f718 (patch) | |
tree | d346efed890a8d36ffa270c6f11112658d7a91a7 /src/codegen.rs | |
parent | aefd93fb14b4781deca481d2a21953c9fd30f361 (diff) | |
download | subplot-f4088defa1d8de5b6d5060bfd2021a23f691f718.tar.gz |
Change: use a base directory for relative paths
This moves the policy decision of what the base directory is to the
main functions of the various programs, instead of hiding it deep in
the call stack and making it implicitly the current working directory.
Diffstat (limited to 'src/codegen.rs')
-rw-r--r-- | src/codegen.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.rs b/src/codegen.rs index fd398af..70d1966 100644 --- a/src/codegen.rs +++ b/src/codegen.rs @@ -43,7 +43,7 @@ fn context(doc: &mut Document) -> Result<Context> { let (funcs_filename, funcs) = match doc.meta().functions_filename() { Some(filename) => (filename, cat(filename)?), - None => ("", "".to_string()), + None => (Path::new(""), "".to_string()), }; context.insert("functions", &funcs); context.insert("functions_filename", funcs_filename); |