mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
archive: if using local file, avoid error trying to copy file to itself
This commit is contained in:
parent
f026b5d597
commit
63f614ebe3
@ -471,6 +471,9 @@ class SourcePackage(object):
|
||||
|
||||
if urlparse(url).scheme in ["", "file"]:
|
||||
frompath = os.path.abspath(urlparse(url).path)
|
||||
if frompath == pathname:
|
||||
Logger.info("Using %s" % pathname)
|
||||
else:
|
||||
Logger.info("Copying %s from %s" % (filename, frompath))
|
||||
shutil.copyfile(frompath, pathname)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user