summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-06 21:33:22 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-06 21:33:22 +0000
commit384d5e348db05c8e5d08804e6d15a504c2557e29 (patch)
treea9850de00976b5e9bbd6b6a94ec69974900f01ef
parent0dd433ffae8135ab3aff4d0a8514ca7b7699a04e (diff)
downloadrdiff-backup-384d5e348db05c8e5d08804e6d15a504c2557e29.tar.gz
Ignore Windows errors caused by too long filenames
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1006 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG4
-rw-r--r--rdiff-backup/rdiff_backup/backup.py19
2 files changed, 17 insertions, 6 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 1ab4081..4cb6c0e 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,10 @@
New in v1.3.1 (????/??/??)
---------------------------
+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.3.0 (2009/01/03)
diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py
index c314d63..39ec4c2 100644
--- a/rdiff-backup/rdiff_backup/backup.py
+++ b/rdiff-backup/rdiff_backup/backup.py
@@ -532,8 +532,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)
@@ -691,14 +694,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)