From bdbcbf7bb8b10b3e255075430b71f00e67a9f5a0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 1 Apr 2017 16:56:21 +0200 Subject: [PATCH] extract: remove duplicate code anything at gets nuked already a few lines above, if possible. --- src/borg/archive.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index c24c9faef..5ed60570a 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -573,8 +573,6 @@ Utilization of max. archive size: {csize_max:.0%} if 'source' in item: source = os.path.join(dest, *item.source.split(os.sep)[stripped_components:]) with backup_io('link'): - if os.path.exists(path): - os.unlink(path) if item.source not in hardlink_masters: os.link(source, path) return @@ -628,8 +626,6 @@ Utilization of max. archive size: {csize_max:.0%} elif stat.S_ISLNK(mode): make_parent(path) source = item.source - if os.path.exists(path): - os.unlink(path) try: os.symlink(source, path) except UnicodeEncodeError: