Commit 59c4dc8a authored by owsla's avatar owsla

Handle quoted current_mirror markers and clean-up the listing of

increments with quoted names.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@811 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 01dd2851
New in v1.1.12 (????/??/??)
---------------------------
Handle quoted current_mirror markers and clean-up the listing of
increments with quoted names. (Andrew Ferguson)
Warn if file modification time is before 1970. (Andrew Ferguson)
......
......@@ -21,7 +21,7 @@
from __future__ import generators
from log import Log
import Globals, Time, static, statistics, restore, selection
import Globals, Time, static, statistics, restore, selection, FilenameMapping
class ManageException(Exception): pass
......@@ -70,7 +70,8 @@ def describe_incs_human(incs, mirror_time, mirrorrp):
result = ["Found %d increments:" % len(incpairs)]
for time, inc in incpairs:
result.append(" %s %s" %
(inc.dirsplit()[1], Time.timetopretty(time)))
(FilenameMapping.unquote(inc.dirsplit()[1]),
Time.timetopretty(time)))
result.append("Current mirror: %s" % Time.timetopretty(mirror_time))
return "\n".join(result)
......
......@@ -21,7 +21,7 @@
from __future__ import generators
import tempfile, os, cStringIO
import static, rorpiter
import static, rorpiter, FilenameMapping
class RestoreError(Exception): pass
......@@ -40,6 +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)
parent_dir = inc_rpath.__class__(inc_rpath.conn, dirname, ())
if not parent_dir.isdir(): return [] # inc directory not created yet
index = inc_rpath.index
......@@ -47,7 +48,8 @@ def get_inclist(inc_rpath):
inc_list = []
for filename in parent_dir.listdir():
inc = parent_dir.append(filename)
if inc.isincfile() and inc.getincbase_str() == basename:
if inc.isincfile() and FilenameMapping.unquote(
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