Skip to content

Commit 19d43a4

Browse files
committed
debug: which path does not have the right permissions.
1 parent 54c8db8 commit 19d43a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

migration/util/node-types/src/executor/movement_executor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ pub struct MovementNode {
3535
}
3636

3737
/// Copies a directory recursively.
38-
fn copy_dir_recursive(src: &Path, dst: &Path) -> std::io::Result<()> {
38+
fn copy_dir_recursive(src: &Path, dst: &Path) -> Result<(), anyhow::Error> {
3939

4040
// make sure the dst directory exists
41-
fs::create_dir_all(dst)?;
41+
fs::create_dir_all(dst).context(format!("failed to create debug directory: {}", dst.display()))?;
4242

4343
for entry in WalkDir::new(src) {
4444
let entry = entry?;
4545
let rel_path = entry.path().strip_prefix(src).unwrap();
4646
let dest_path = dst.join(rel_path);
4747

4848
if entry.file_type().is_dir() {
49-
fs::create_dir_all(&dest_path)?;
49+
fs::create_dir_all(&dest_path).context(format!("failed to create directory: {}", dest_path.display()))?;
5050
} else {
51-
fs::copy(entry.path(), &dest_path)?;
51+
fs::copy(entry.path(), &dest_path).context(format!("failed to copy file: {}", entry.path().display()))?;
5252
}
5353
}
5454
Ok(())

0 commit comments

Comments
 (0)