Remove absolute path for files in the current directory.
This commit is contained in:
parent
7c93622b57
commit
e3668227c0
@ -78,7 +78,12 @@ fn main() {
|
||||
eprintln!("Error script file path: {}\n{}", filename, err);
|
||||
exit(1);
|
||||
}
|
||||
Ok(f) => f,
|
||||
Ok(f) => {
|
||||
match f.strip_prefix(std::env::current_dir().unwrap().canonicalize().unwrap()) {
|
||||
Ok(f) => f.into(),
|
||||
_ => f,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
contents.clear();
|
||||
|
@ -43,7 +43,11 @@ fn main() {
|
||||
eprintln!("Error script file path: {}\n{}", filename, err);
|
||||
exit(1);
|
||||
}
|
||||
Ok(f) => f,
|
||||
Ok(f) => match f.strip_prefix(std::env::current_dir().unwrap().canonicalize().unwrap())
|
||||
{
|
||||
Ok(f) => f.into(),
|
||||
_ => f,
|
||||
},
|
||||
};
|
||||
|
||||
let mut engine = Engine::new();
|
||||
|
Loading…
Reference in New Issue
Block a user