Commit 078eb1d6 authored by bescoto's avatar bescoto

Fix for "Directory not empty" bug


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@686 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 621992b1
...@@ -5,7 +5,11 @@ Applied Alec Berryman's patch to update the no-compression regexp. ...@@ -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. 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) New in v1.0.2 (2005/10/24)
......
...@@ -109,12 +109,12 @@ class SourceStruct: ...@@ -109,12 +109,12 @@ class SourceStruct:
diff_rorp = src_rp.getRORPath() diff_rorp = src_rp.getRORPath()
if dest_sig.isflaglinked(): if dest_sig.isflaglinked():
diff_rorp.flaglinked(dest_sig.get_link_flag()) 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(): 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() dest_sig.close_if_necessary()
else: diff_rorp.set_attached_filetype('snapshot') diff_rorp.set_attached_filetype('snapshot')
yield diff_rorp yield diff_rorp
static.MakeClass(SourceStruct) static.MakeClass(SourceStruct)
......
...@@ -873,7 +873,7 @@ class RPath(RORPath): ...@@ -873,7 +873,7 @@ class RPath(RORPath):
log.Log("Deleting %s" % self.path, 7) log.Log("Deleting %s" % self.path, 7)
if self.isdir(): if self.isdir():
try: self.rmdir() try: self.rmdir()
except os.error: except EnvironmentError:
if Globals.fsync_directories: self.fsync() if Globals.fsync_directories: self.fsync()
self.conn.shutil.rmtree(self.path) self.conn.shutil.rmtree(self.path)
else: self.conn.os.unlink(self.path) else: self.conn.os.unlink(self.path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment