Commit 183ab81f authored by owsla's avatar owsla

Give an UpdateError when a path or filename is too long on Windows.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@1002 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 11918af1
New in v1.2.5 (2009/01/06)
---------------------------
Fix typo in robust.py which broke error reporting. Closes Savannah bug #25255.
Ignore Windows errors caused by too long filenames; the files are not yet
backed-up, but the backup process is no longer halted. (Andrew Ferguson)
New in v1.2.4 (2009/01/01)
---------------------------
......
......@@ -528,8 +528,11 @@ class PatchITRB(rorpiter.ITRBranch):
tf = TempFile.new(mirror_rp)
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
if tf.lstat():
rpath.rename(tf, mirror_rp)
self.CCPP.flag_success(index)
if robust.check_common_error(self.error_handler, rpath.rename,
(tf, mirror_rp)) is None:
self.CCPP.flag_success(index)
else:
tf.delete()
elif mirror_rp and mirror_rp.lstat():
mirror_rp.delete()
self.CCPP.flag_deleted(index)
......@@ -687,14 +690,18 @@ class IncrementITRB(PatchITRB):
self.CCPP.get_rorps(index), self.basis_root_rp, self.inc_root_rp)
tf = TempFile.new(mirror_rp)
if self.patch_to_temp(mirror_rp, diff_rorp, tf):
inc = increment.Increment(tf, mirror_rp, inc_prefix)
if inc is not None:
inc = robust.check_common_error(self.error_handler,
increment.Increment, (tf, mirror_rp, inc_prefix))
if inc is not None and not isinstance(inc, int):
self.CCPP.set_inc(index, inc)
if inc.isreg():
inc.fsync_with_dir() # Write inc before rp changed
if tf.lstat():
rpath.rename(tf, mirror_rp)
self.CCPP.flag_success(index)
if robust.check_common_error(self.error_handler,
rpath.rename, (tf, mirror_rp)) is None:
self.CCPP.flag_success(index)
else:
tf.delete()
elif mirror_rp.lstat():
mirror_rp.delete()
self.CCPP.flag_deleted(index)
......
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