Commit 9f0fcbbf authored by dgaudet's avatar dgaudet

Fix for bug #19896 -- symlink() doesn't work on a CIFS-mounted Windows

share.  (Jonathan Hankins)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@802 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ca516f39
New in v1.1.11 (????/??/??) New in v1.1.11 (????/??/??)
--------------------------- ---------------------------
Fix for bug #19896 -- symlink() doesn't work on a CIFS-mounted Windows
share. (Jonathan Hankins)
Fix for bug #19895 -- eliminate traceback for special file detection Fix for bug #19895 -- eliminate traceback for special file detection
on CIFS mounts. (Jonathan Hankins) on CIFS mounts. (Jonathan Hankins)
......
...@@ -408,14 +408,18 @@ class FSAbilities: ...@@ -408,14 +408,18 @@ class FSAbilities:
sym_source = dir_rp.append("symlinked_file1") sym_source = dir_rp.append("symlinked_file1")
sym_source.touch() sym_source.touch()
sym_dest = dir_rp.append("symlinked_file2") sym_dest = dir_rp.append("symlinked_file2")
sym_dest.symlink(sym_source.path) try:
sym_dest.setdata() sym_dest.symlink(sym_source.path)
assert sym_dest.issym() except (OSError):
orig_umask = os.umask(077) self.symlink_perms = 0
if sym_dest.getperms() == 0700: self.symlink_perms = 1 else:
else: self.symlink_perms = 0 sym_dest.setdata()
os.umask(orig_umask) assert sym_dest.issym()
sym_dest.delete() orig_umask = os.umask(077)
if sym_dest.getperms() == 0700: self.symlink_perms = 1
else: self.symlink_perms = 0
os.umask(orig_umask)
sym_dest.delete()
sym_source.delete() sym_source.delete()
def set_escape_dos_devices(self, subdir): def set_escape_dos_devices(self, subdir):
......
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