summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-12-22 03:59:02 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-12-22 03:59:02 +0000
commitb70234092cc402ae7adb9065df641806431a969d (patch)
tree497a2e8686455a96fae7cb46be7bbdf1b875b99f
parentb9d13d3edcfde86ff43abaff7007d22630e5641a (diff)
downloadrdiff-backup-b70234092cc402ae7adb9065df641806431a969d.tar.gz
long directory name fix
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-0@715 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-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"""