summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-06 21:11:15 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-06 21:11:15 +0000
commitad2fd74f21a2f257bd8675e35a450c35a9e52bdd (patch)
tree15e2e505976ecad9f87c7fc8183697308fba5686
parenta9098e5b7bd72a8feecd3c0d6a719a974388bca7 (diff)
downloadrdiff-backup-ad2fd74f21a2f257bd8675e35a450c35a9e52bdd.tar.gz
Give an UpdateError when a path or filename is too long on Windows.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-2@1002 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG9
-rw-r--r--rdiff-backup/rdiff_backup/backup.py19
2 files changed, 22 insertions, 6 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index a74494c..f5e4ab1 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,3 +1,12 @@
+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)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py
index 6284a6b..e152d8f 100644
--- a/rdiff-backup/rdiff_backup/backup.py
+++ b/rdiff-backup/rdiff_backup/backup.py
@@ -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)