summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/increment.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-02-01 08:13:05 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-02-01 08:13:05 +0000
commit64976e6afefff455ee9515218942a65c6ff5eede (patch)
treecbe6d3965de77e0ebf6159eec15f24730cc5bf60 /rdiff-backup/rdiff_backup/increment.py
parenta5207ada368bf6a9eb31e8c094124dbf2cc1175e (diff)
downloadrdiff-backup-64976e6afefff455ee9515218942a65c6ff5eede.tar.gz
Re-added --windows-mode option
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@273 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/increment.py')
-rw-r--r--rdiff-backup/rdiff_backup/increment.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/increment.py b/rdiff-backup/rdiff_backup/increment.py
index a9d5413..76578fe 100644
--- a/rdiff-backup/rdiff_backup/increment.py
+++ b/rdiff-backup/rdiff_backup/increment.py
@@ -85,12 +85,19 @@ def makedir(mirrordir, incpref):
return dirsign
def get_inc(rp, time, typestr):
- """Return increment like rp but with time and typestr suffixes"""
+ """Return increment like rp but with time and typestr suffixes
+
+ To avoid any quoting, the returned rpath has empty index, and the
+ whole filename is in the base (which is not quoted).
+
+ """
addtostr = lambda s: "%s.%s.%s" % (s, Time.timetostring(time), typestr)
if rp.index:
incrp = rp.__class__(rp.conn, rp.base, rp.index[:-1] +
(addtostr(rp.index[-1]),))
- else: incrp = rp.__class__(rp.conn, addtostr(rp.base), rp.index)
+ else:
+ dirname, basename = rp.dirsplit()
+ incrp = rp.__class__(rp.conn, dirname, (addtostr(basename),))
return incrp
def get_inc_ext(rp, typestr, inctime = None):