summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/backup.py5
-rw-r--r--rdiff-backup/testing/regressiontest.py1
3 files changed, 8 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index da193e4..2d24ca5 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -4,6 +4,9 @@ New in v1.0.4 (????/??/??)
Files with ACLs will not be unnecessarily marked as changed (bug
report by Carsten Lorenz).
+Another fix for long-filenames crash, this time when a long-named
+directory with files in it gets deleted
+
New in v1.0.3 (2005/11/25)
--------------------------
diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py
index 26cda63..8e4f5b5 100644
--- a/rdiff-backup/rdiff_backup/backup.py
+++ b/rdiff-backup/rdiff_backup/backup.py
@@ -584,7 +584,10 @@ class PatchITRB(rorpiter.ITRBranch):
rpath.copy_attribs(self.dir_update, self.base_rp)
else:
assert self.dir_replacement
- self.base_rp.rmdir()
+ try: self.base_rp.rmdir()
+ except OSError:
+ log.Log("Warning: unable to rmdir " + self.base_rp.path, 2)
+ self.base_rp.delete()
if self.dir_replacement.lstat():
rpath.rename(self.dir_replacement, self.base_rp)
diff --git a/rdiff-backup/testing/regressiontest.py b/rdiff-backup/testing/regressiontest.py
index 427ed83..2a39e0d 100644
--- a/rdiff-backup/testing/regressiontest.py
+++ b/rdiff-backup/testing/regressiontest.py
@@ -159,6 +159,7 @@ class IncrementTest1(unittest.TestCase):
Myrm(Local.rpout.path)
InternalBackup(1, 1, "testfiles/longfilenames1", Local.rpout.path, 100)
InternalBackup(1, 1, "testfiles/longfilenames2", Local.rpout.path, 200)
+ InternalBackup(1, 1, "testfiles/empty", Local.rpout.path, 300)
def test_quoted_hardlinks(self):
"""Test backing up a directory with quoted hardlinks in it"""