File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,8 @@ def _relocate(src, dst):
299
299
if src == dst :
300
300
return
301
301
302
- if action == "move" :
302
+ _action = action
303
+ if _action == "move" :
303
304
# do not move anything if we are trying to move an entity from
304
305
# outside of the source directories
305
306
if any (os .path .commonprefix ([path , src ]) == path for path in source_directories ):
@@ -310,8 +311,11 @@ def _relocate(src, dst):
310
311
_relocate (dir_entry .path , fs_access .join (dst , dir_entry .name ))
311
312
else :
312
313
shutil .move (src , dst )
314
+ else :
315
+ # we still need the files at the destination, so let's copy them
316
+ _action = "copy"
313
317
314
- elif action == "copy" :
318
+ if _action == "copy" :
315
319
_logger .debug ("Copying %s to %s" , src , dst )
316
320
if fs_access .isdir (src ):
317
321
if os .path .isdir (dst ):
You can’t perform that action at this time.
0 commit comments