diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-08 12:24:08 +1300 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2025-01-08 12:24:37 +1300 |
commit | 26191d997c33c70ed174ac61fcc35cbf0f75c721 (patch) | |
tree | 32243c531ff0e59d4b60f5efa87c23ce687b1ef2 /src/operations/cp.rs | |
parent | bd6c24a92f4ac01625f73adac075c90c36e3f74a (diff) | |
download | vagabond-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/cp.rs')
-rw-r--r-- | src/operations/cp.rs | 2 |
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) => { |