diff options
Diffstat (limited to 'dhall/src/phase/resolve.rs')
-rw-r--r-- | dhall/src/phase/resolve.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dhall/src/phase/resolve.rs b/dhall/src/phase/resolve.rs index a58f5e4..b10a7bd 100644 --- a/dhall/src/phase/resolve.rs +++ b/dhall/src/phase/resolve.rs @@ -30,14 +30,14 @@ fn resolve_import( }; match &import.location { Local(prefix, path) => { - let path: PathBuf = path.iter().cloned().collect(); - let path = match prefix { + let path_buf: PathBuf = path.file_path.iter().collect(); + let path_buf = match prefix { // TODO: fail gracefully - Parent => cwd.parent().unwrap().join(path), - Here => cwd.join(path), + Parent => cwd.parent().unwrap().join(path_buf), + Here => cwd.join(path_buf), _ => unimplemented!("{:?}", import), }; - Ok(load_import(&path, import_cache, import_stack).map_err(|e| { + Ok(load_import(&path_buf, import_cache, import_stack).map_err(|e| { ImportError::Recursive(import.clone(), Box::new(e)) })?) } |