Do not call fs::remove_file in cp_link_filtered_recurse

The target is removed by `copy_link` too, so no need to duplicate the syscall.
This commit is contained in:
Jakub Beránek
2025-08-15 17:13:21 +02:00
parent 1ae7c49072
commit 5107ac92bb
-1
View File
@@ -1862,7 +1862,6 @@ fn cp_link_filtered_recurse(
self.create_dir(&dst);
self.cp_link_filtered_recurse(&path, &dst, &relative, filter);
} else {
let _ = fs::remove_file(&dst);
self.copy_link(&path, &dst, FileType::Regular);
}
}