diff --git a/secondary.py b/secondary.py index 936e3113c86229069745c611f79010ef58d1c46a..c308633a83b7b999243197add23d450936ace646 100644 --- a/secondary.py +++ b/secondary.py @@ -75,13 +75,13 @@ class Backup: self.status.replaced += 1 self.delete(dst) self.add(src) - elif os.path.exists(dst_path): + elif os.path.lexists(dst_path): changed = False if src.kind in [ b'F', b'D'] and src.mode != dst.mode: self.log.DEBUG('MODE', dst.name, src.mode, dst.mode) os.chmod(dst_path, int(src.mode, 8)) changed = True - if (src.kind in [ b'F', b'D'] and + if (src.kind in [ b'F', b'D', b'L', b'S'] and (src.uid != dst.uid or src.gid != dst.gid)): self.log.DEBUG('UID/GID', dst.name, src.uid, src.gid, dst.uid, dst.gid)