Commit 6d2baeb3 authored by owsla's avatar owsla

Finally fix 'No such file or directory' bug when attempting to regress after

a failed backup. (Patch from Josh Nisly)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@885 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 2f71f7e1
New in v1.1.16 (????/??/??) New in v1.1.16 (????/??/??)
--------------------------- ---------------------------
Finally fix 'No such file or directory' bug when attempting to regress after
a failed backup. (Patch from Josh Nisly)
Improve Unicode support by escaping Unicode characters in filenames Improve Unicode support by escaping Unicode characters in filenames
when printing them in log messages from eas_acls.py. (Fix from when printing them in log messages from eas_acls.py. (Fix from
Saptarshi Guha) Saptarshi Guha)
......
...@@ -141,8 +141,9 @@ def recreate_meta(meta_manager): ...@@ -141,8 +141,9 @@ def recreate_meta(meta_manager):
the reverse. the reverse.
""" """
temprp = TempFile.new_in_dir(Globals.rbdir) temprp = [TempFile.new_in_dir(Globals.rbdir)]
writer = metadata.MetadataFile(temprp, 'w', check_path = 0) def callback(rp): temprp[0] = rp
writer = metadata.MetadataFile(temprp[0], 'w', check_path = 0, callback = callback)
for rorp in meta_manager.get_meta_at_time(regress_time, None): for rorp in meta_manager.get_meta_at_time(regress_time, None):
writer.write_object(rorp) writer.write_object(rorp)
writer.close() writer.close()
...@@ -150,7 +151,7 @@ def recreate_meta(meta_manager): ...@@ -150,7 +151,7 @@ def recreate_meta(meta_manager):
finalrp = Globals.rbdir.append("mirror_metadata.%s.snapshot.gz" % finalrp = Globals.rbdir.append("mirror_metadata.%s.snapshot.gz" %
Time.timetostring(regress_time)) Time.timetostring(regress_time))
assert not finalrp.lstat(), finalrp assert not finalrp.lstat(), finalrp
rpath.rename(temprp, finalrp) rpath.rename(temprp[0], finalrp)
if Globals.fsync_directories: Globals.rbdir.fsync() if Globals.fsync_directories: Globals.rbdir.fsync()
def iterate_raw_rfs(mirror_rp, inc_rp): def iterate_raw_rfs(mirror_rp, inc_rp):
......
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