Commit 8002dc4e authored by dgaudet's avatar dgaudet

on symlink perm setting -- save the orig_umask so we don't have to

hardcode any specific umask.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@763 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent f505487a
...@@ -103,9 +103,9 @@ def copy(rpin, rpout, compress = 0): ...@@ -103,9 +103,9 @@ def copy(rpin, rpout, compress = 0):
elif rpin.issym(): elif rpin.issym():
# some systems support permissions for symlinks, but # some systems support permissions for symlinks, but
# only by setting at creation via the umask # only by setting at creation via the umask
os.umask(0777 - rpin.getperms()) orig_umask = os.umask(0777 & ~rpin.getperms())
rpout.symlink(rpin.readlink()) rpout.symlink(rpin.readlink())
os.umask(077) # restore rdiff-backup standard umask os.umask(orig_umask) # restore previous umask
elif rpin.ischardev(): elif rpin.ischardev():
major, minor = rpin.getdevnums() major, minor = rpin.getdevnums()
rpout.makedev("c", major, minor) rpout.makedev("c", major, minor)
......
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