file: Don't overwrite file when using with local filesystem
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ class File:
|
|||||||
else:
|
else:
|
||||||
# copy to transfer dir
|
# copy to transfer dir
|
||||||
ctx.ui.info(_("Copying %s to transfer dir") % uri.get_uri(), verbose=True)
|
ctx.ui.info(_("Copying %s to transfer dir") % uri.get_uri(), verbose=True)
|
||||||
shutil.copy(uri.get_uri(), transfer_dir)
|
shutil.copy(uri.get_uri(), localfile)
|
||||||
else:
|
else:
|
||||||
localfile = uri.get_uri() #TODO: use a special function here?
|
localfile = uri.get_uri() #TODO: use a special function here?
|
||||||
if not os.path.exists(localfile):
|
if not os.path.exists(localfile):
|
||||||
|
|||||||
Reference in New Issue
Block a user