* don't fail if two files are the same
This commit is contained in:
+4
-2
@@ -106,8 +106,10 @@ class File:
|
||||
ctx.ui.info(_("Fetching %s") % uri.get_uri())
|
||||
fetch_url(uri, transfer_dir)
|
||||
else:
|
||||
ctx.ui.info(_("Copying %s to transfer dir") % uri.get_uri())
|
||||
shutil.copy(uri.get_uri(), transfer_dir)
|
||||
# copy to transfer dir, it's okay if transfer_dir is the same
|
||||
if not os.path.samefile(uri.get_uri(), join(transfer_dir, uri.filename())):
|
||||
ctx.ui.info(_("Copying %s to transfer dir") % uri.get_uri())
|
||||
shutil.copy(uri.get_uri(), transfer_dir)
|
||||
else:
|
||||
localfile = uri.get_uri() #TODO: use a special function here?
|
||||
if not os.path.exists(localfile):
|
||||
|
||||
Reference in New Issue
Block a user