diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-08-23 23:42:57 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-08-23 23:42:57 +0000 |
commit | 94da66c4015094e2c5a71e945ef3562644543c0f (patch) | |
tree | 9c658f51d1259e0427f131a4b8001b5ebef97eab /rdiff-backup/rdiff_backup/increment.py | |
parent | 9c8889d79e47e88564cd636efa050243be69ead5 (diff) | |
download | rdiff-backup-94da66c4015094e2c5a71e945ef3562644543c0f.tar.gz |
Added tests for and fixed problem with backing up unreadable regular
files as root on source and non-root on dest.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@399 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/increment.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/increment.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/increment.py b/rdiff-backup/rdiff_backup/increment.py index 8d829e2..ea7a81d 100644 --- a/rdiff-backup/rdiff_backup/increment.py +++ b/rdiff-backup/rdiff_backup/increment.py @@ -79,7 +79,13 @@ def makediff(new, mirror, incpref): if compress: diff = get_inc(incpref, "diff.gz") else: diff = get_inc(incpref, "diff") - Rdiff.write_delta(new, mirror, diff, compress) + if Globals.process_uid != 0 and not new.readable(): + # Check for unreadable files + old_new_perms = new.getperms() + new.chmod(0400 | old_new_perms) + Rdiff.write_delta(new, mirror, diff, compress) + new.chmod(old_new_perms) + else: Rdiff.write_delta(new, mirror, diff, compress) rpath.copy_attribs(mirror, diff) return diff |