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 (????/??/??)
---------------------------
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
on CIFS mounts. (Jonathan Hankins)
......
......@@ -408,14 +408,18 @@ class FSAbilities:
sym_source = dir_rp.append("symlinked_file1")
sym_source.touch()
sym_dest = dir_rp.append("symlinked_file2")
sym_dest.symlink(sym_source.path)
sym_dest.setdata()
assert sym_dest.issym()
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()
try:
sym_dest.symlink(sym_source.path)
except (OSError):
self.symlink_perms = 0
else:
sym_dest.setdata()
assert sym_dest.issym()
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()
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