Skip to content

Commit 4a1ae81

Browse files
authored
Merge pull request #52 from debox-network/fix-litmus-copymove-10
MOVE must remove an existing Destination before renaming
2 parents 135edb6 + 0d62efb commit 4a1ae81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handle_copymove.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl<C: Clone + Send + Sync + 'static> DavInner<C> {
263263
let mut multierror = MultiError::new(tx);
264264

265265
// see if we need to delete the destination first.
266-
if overwrite && exists && depth != Depth::Zero && !dest_is_file {
266+
if overwrite && exists && (depth != Depth::Zero || dest_is_file) {
267267
trace!("handle_copymove: deleting destination {dest}");
268268
if self
269269
.delete_items(&mut multierror, Depth::Infinity, dmeta.unwrap(), &dest)

0 commit comments

Comments
 (0)