summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-11-22 22:45:12 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-11-22 22:45:12 +0000
commit559b413a54f2e6c33347f9f1dc97b8c84880eb1d (patch)
tree42b224cf6397be8d65669ceb8d41d3922b52b5d0
parentd397d6072214a785a570b5fb3472c766442f71ed (diff)
downloadrdiff-backup-559b413a54f2e6c33347f9f1dc97b8c84880eb1d.tar.gz
Fix for "Directory not empty" bug
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r1-0@686 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG6
-rw-r--r--rdiff-backup/rdiff_backup/backup.py8
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py2
3 files changed, 10 insertions, 6 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index bd175db..3d8d6e7 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -5,7 +5,11 @@ Applied Alec Berryman's patch to update the no-compression regexp.
Alec Berryman's fs_abilities patch is supposed to help with AFS.
-Fixed filename-too-long crash when quoting.
+Fixed (version of) filename-too-long crash when quoting.
+
+Due to very detailed error report from Yoav, fixed a "Directory not
+empty" error that can arise on emulated filesystems like NFS and
+EncFS.
New in v1.0.2 (2005/10/24)
diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py
index a34eb73..26cda63 100644
--- a/rdiff-backup/rdiff_backup/backup.py
+++ b/rdiff-backup/rdiff_backup/backup.py
@@ -109,12 +109,12 @@ class SourceStruct:
diff_rorp = src_rp.getRORPath()
if dest_sig.isflaglinked():
diff_rorp.flaglinked(dest_sig.get_link_flag())
- elif dest_sig.isreg() and src_rp.isreg():
- attach_diff(diff_rorp, src_rp, dest_sig)
elif src_rp.isreg():
- attach_snapshot(diff_rorp, src_rp)
+ if dest_sig.isreg(): attach_diff(diff_rorp, src_rp, dest_sig)
+ else: attach_snapshot(diff_rorp, src_rp)
+ else:
dest_sig.close_if_necessary()
- else: diff_rorp.set_attached_filetype('snapshot')
+ diff_rorp.set_attached_filetype('snapshot')
yield diff_rorp
static.MakeClass(SourceStruct)
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index 15f4a59..ac24a31 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -873,7 +873,7 @@ class RPath(RORPath):
log.Log("Deleting %s" % self.path, 7)
if self.isdir():
try: self.rmdir()
- except os.error:
+ except EnvironmentError:
if Globals.fsync_directories: self.fsync()
self.conn.shutil.rmtree(self.path)
else: self.conn.os.unlink(self.path)