extract: remove duplicate code

anything at <path> gets nuked already a few lines above, if possible.
This commit is contained in:
Thomas Waldmann 2017-04-01 16:56:21 +02:00
parent 30f5e6efbb
commit bdbcbf7bb8
1 changed files with 0 additions and 4 deletions

View File

@ -573,8 +573,6 @@ Utilization of max. archive size: {csize_max:.0%}
if 'source' in item: if 'source' in item:
source = os.path.join(dest, *item.source.split(os.sep)[stripped_components:]) source = os.path.join(dest, *item.source.split(os.sep)[stripped_components:])
with backup_io('link'): with backup_io('link'):
if os.path.exists(path):
os.unlink(path)
if item.source not in hardlink_masters: if item.source not in hardlink_masters:
os.link(source, path) os.link(source, path)
return return
@ -628,8 +626,6 @@ Utilization of max. archive size: {csize_max:.0%}
elif stat.S_ISLNK(mode): elif stat.S_ISLNK(mode):
make_parent(path) make_parent(path)
source = item.source source = item.source
if os.path.exists(path):
os.unlink(path)
try: try:
os.symlink(source, path) os.symlink(source, path)
except UnicodeEncodeError: except UnicodeEncodeError: