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/rpath.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/rpath.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 247dc40..43f14e3 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -885,6 +885,14 @@ class RPath(RORPath): raise RPathException("Error closing file") self.setdata() + def write_string(self, s, compress = None): + """Write string s into rpath""" + assert not self.lstat(), "File %s already exists" % (self.path,) + outfp = self.open("wb", compress = compress) + outfp.write(s) + assert not outfp.close() + self.setdata() + def isincfile(self): """Return true if path looks like an increment file |