From 384d5e348db05c8e5d08804e6d15a504c2557e29 Mon Sep 17 00:00:00 2001 From: owsla Date: Tue, 6 Jan 2009 21:33:22 +0000 Subject: 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 --- rdiff-backup/CHANGELOG | 4 ++++ rdiff-backup/rdiff_backup/backup.py | 19 +++++++++++++------ 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) -- cgit v1.2.1