diff options
Diffstat (limited to 'tvix/store/src/bin')
-rw-r--r-- | tvix/store/src/bin/tvix-store.rs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 9b07117d71ff..ecee8d78f3b7 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -305,16 +305,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let path_info_service = path_info_service.clone(); async move { - let resp = tvix_store::import::import_path_as_nar_ca( - path, - blob_service, - directory_service, - path_info_service, - ) - .await; - if let Ok(output_path) = resp { - // If the import was successful, print the path to stdout. - println!("{}", output_path.to_absolute_path()); + if let Ok(name) = tvix_store::import::path_to_name(&path) { + let resp = tvix_store::import::import_path_as_nar_ca( + &path, + name, + blob_service, + directory_service, + path_info_service, + ) + .await; + if let Ok(output_path) = resp { + // If the import was successful, print the path to stdout. + println!("{}", output_path.to_absolute_path()); + } } } }) |