mirror of
https://github.com/cobalt-org/cobalt.rs
synced 2024-11-10 06:14:12 +00:00
fix: Ensure root is valid path
This commit is contained in:
parent
12e7d60ab8
commit
0f72122831
1 changed files with 3 additions and 0 deletions
|
@ -79,6 +79,9 @@ impl Config {
|
|||
|
||||
let mut root = path;
|
||||
root.pop(); // Remove filename
|
||||
if root == std::path::Path::new("") {
|
||||
root = std::path::Path::new(".").to_owned();
|
||||
}
|
||||
config.root = root;
|
||||
|
||||
Ok(config)
|
||||
|
|
Loading…
Reference in a new issue