summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-08-23 23:58:08 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-08-23 23:58:08 +0000
commit188794d438954505a5c2effb74ddea5105b8b40e (patch)
tree0afc825adca627da6661f838e2863c65c2fef3a4 /rdiff-backup/rdiff_backup/rpath.py
parent0cde1ef022765b5763cf68be308553460bcbaadb (diff)
downloadrdiff-backup-188794d438954505a5c2effb74ddea5105b8b40e.tar.gz
Mostly fixing unreadable reg root source/non-root dest bug
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r0-12@400 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index ec513fd..0f3ddc1 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -828,6 +828,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