From 26191d997c33c70ed174ac61fcc35cbf0f75c721 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Wed, 8 Jan 2025 12:24:08 +1300 Subject: 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. --- src/operations/cp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/operations') 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, destination_path: impl AsRef) - // 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) => { -- cgit v1.2.3-70-g09d2