summaryrefslogtreecommitdiff
path: root/src/operations
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2025-01-08 12:24:08 +1300
committerBen Bridle <bridle.benjamin@gmail.com>2025-01-08 12:24:37 +1300
commit26191d997c33c70ed174ac61fcc35cbf0f75c721 (patch)
tree32243c531ff0e59d4b60f5efa87c23ce687b1ef2 /src/operations
parentbd6c24a92f4ac01625f73adac075c90c36e3f74a (diff)
downloadvagabond-26191d997c33c70ed174ac61fcc35cbf0f75c721.zip
Fix issue when copying a directory to a directory
The copy-contents-of-a-directory logic as using the copy_file function, which would fail if the directory contained another directory.
Diffstat (limited to 'src/operations')
-rw-r--r--src/operations/cp.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/operations/cp.rs b/src/operations/cp.rs
index 27be3ce..33d4d04 100644
--- a/src/operations/cp.rs
+++ b/src/operations/cp.rs
@@ -27,7 +27,7 @@ pub fn copy(source_path: impl AsRef<Path>, destination_path: impl AsRef<Path>) -
// The destination is filled with the contents of the source directory
for entry in list_directory(source_path)? {
let destination_path = destination_path.as_ref().join(&entry.name);
- copy_file(entry.path, destination_path)?;
+ copy(entry.path, destination_path)?;
}
}
(EntryType::Directory, None) => {