We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba5f538 commit 6e2363fCopy full SHA for 6e2363f
src/module.rs
@@ -184,7 +184,13 @@ impl Input {
184
};
185
186
// TODO: Maybe convert the path earlier in the module building.
187
- let target_path = Path::new(&self.options.target_dir).canonicalize().unwrap();
+ let relative_path = Path::new(&self.options.target_dir);
188
+ // Try to find the root element in an absolute path.
189
+ // If the absolute path cannot be constructed due to an error, search the relative path instead.
190
+ let target_path = match relative_path.canonicalize() {
191
+ Ok(path) => path,
192
+ Err(_) => relative_path.to_path_buf(),
193
+ };
194
195
// Split the target path into components
196
let mut component_vec: Vec<_> = target_path
0 commit comments