Commit a9c85513 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Allow uid/gid changing for symlinks and sockets

parent 731d346b
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment