summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-11-05 20:25:02 +0000
committerdgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-11-05 20:25:02 +0000
commit724e20829c005c4e283be93a823a93cbf81660d7 (patch)
tree14b750d2f15ffd76505a3fe932d9c7cf4b63984b
parent1d926b33ba7fc084cf5418e49aba272947d93a4b (diff)
downloadrdiff-backup-724e20829c005c4e283be93a823a93cbf81660d7.tar.gz
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/trunk@763 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index 4f5cbb9..36cc8af 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -103,9 +103,9 @@ def copy(rpin, rpout, compress = 0):
elif rpin.issym():
# some systems support permissions for symlinks, but
# only by setting at creation via the umask
- os.umask(0777 - rpin.getperms())
+ orig_umask = os.umask(0777 & ~rpin.getperms())
rpout.symlink(rpin.readlink())
- os.umask(077) # restore rdiff-backup standard umask
+ os.umask(orig_umask) # restore previous umask
elif rpin.ischardev():
major, minor = rpin.getdevnums()
rpout.makedev("c", major, minor)