Commit e3b48115 authored by owsla's avatar owsla

Bugfixes for when Globals.chars_to_quote is None


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@813 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent a9e61002
......@@ -68,10 +68,15 @@ def describe_incs_human(incs, mirror_time, mirrorrp):
incpairs.sort()
result = ["Found %d increments:" % len(incpairs)]
for time, inc in incpairs:
result.append(" %s %s" %
(FilenameMapping.unquote(inc.dirsplit()[1]),
Time.timetopretty(time)))
if Globals.chars_to_quote:
for time, inc in incpairs:
result.append(" %s %s" %
(FilenameMapping.unquote(inc.dirsplit()[1]),
Time.timetopretty(time)))
else:
for time, inc in incpairs:
result.append(" %s %s" %
(inc.dirsplit()[1], Time.timetopretty(time)))
result.append("Current mirror: %s" % Time.timetopretty(mirror_time))
return "\n".join(result)
......
......@@ -40,7 +40,7 @@ def Restore(mirror_rp, inc_rpath, target, restore_to_time):
def get_inclist(inc_rpath):
"""Returns increments with given base"""
dirname, basename = inc_rpath.dirsplit()
basename = FilenameMapping.unquote(basename)
if Globals.chars_to_quote: basename = FilenameMapping.unquote(basename)
parent_dir = inc_rpath.__class__(inc_rpath.conn, dirname, ())
if not parent_dir.isdir(): return [] # inc directory not created yet
index = inc_rpath.index
......@@ -48,8 +48,7 @@ def get_inclist(inc_rpath):
inc_list = []
for filename in parent_dir.listdir():
inc = parent_dir.append(filename)
if inc.isincfile() and FilenameMapping.unquote(
inc.getincbase_str()) == basename:
if inc.isincfile() and inc.getincbase_str() == basename:
inc_list.append(inc)
return inc_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment