diff --git a/src/repository/item.rs b/src/repository/item.rs index 01a8ecf..4d7fe4c 100644 --- a/src/repository/item.rs +++ b/src/repository/item.rs @@ -43,6 +43,7 @@ impl RepositoryItem { let original_source_path = Path::new(self.original_source_path()); let source_path_relative = original_source_path.strip_prefix("/")?; let source_path_relative = source_path_relative.to_string_lossy(); + let target_path = save_to.join(&source_path_relative)?; let parent = target_path .parent() @@ -54,6 +55,7 @@ impl RepositoryItem { } self.absolute_path.copy_file(&target_path)?; + log::debug!("[{}] saved data to {}", getpid(), target_path.as_str()); Ok(()) } diff --git a/src/test/assertions.rs b/src/test/assertions.rs index 1d798b5..e279ec5 100644 --- a/src/test/assertions.rs +++ b/src/test/assertions.rs @@ -172,7 +172,7 @@ pub mod in_memory { fn assert_target_file_contents(restored_path: &VfsPath, expected_contents: &[u8]) -> Result<()> { let mut actual_contents = vec![]; - assert!(restored_path.exists(), "Expected '{:?}' to be there", restored_path); + assert!(restored_path.exists(), "expected '{}' to be there", restored_path.as_str()); restored_path.open_file()?.read_to_end(&mut actual_contents)?; assert_eq!(expected_contents, actual_contents); Ok(()) diff --git a/src/test/source.rs b/src/test/source.rs index 6cd3c9b..5bc0b0c 100644 --- a/src/test/source.rs +++ b/src/test/source.rs @@ -20,7 +20,6 @@ impl TestSource { let path = self.file_path(filename)?; let mut file = path.create_file()?; file.write_all(bytes)?; - dbg!(format!("wrote bytes under {}", filename)); Ok(()) }