Commit 89bc3b57 authored by owsla's avatar owsla

Test for symlink permissions now produces a functioning symlink.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@968 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 0a6932ea
New in v1.2.3 (????/??/??) New in v1.2.3 (????/??/??)
--------------------------- ---------------------------
Test for symlink permissions now produces a functioning symlink. Thanks to
Julien Poffet for reporting the issue. (Andrew Ferguson)
Fix for crash when deleting read-only files on Windows. (Patch from Josh Nisly) Fix for crash when deleting read-only files on Windows. (Patch from Josh Nisly)
Fix for Python 2.2 in win_acls.py (Closes Savannah bug #24922). Fix for Python 2.2 in win_acls.py (Closes Savannah bug #24922).
......
...@@ -542,16 +542,14 @@ class FSAbilities: ...@@ -542,16 +542,14 @@ class FSAbilities:
sym_source.touch() sym_source.touch()
sym_dest = dir_rp.append("symlinked_file2") sym_dest = dir_rp.append("symlinked_file2")
try: try:
sym_dest.symlink(sym_source.path) sym_dest.symlink("symlinked_file1")
except (OSError, AttributeError): except (OSError, AttributeError):
self.symlink_perms = 0 self.symlink_perms = 0
else: else:
sym_dest.setdata() sym_dest.setdata()
assert sym_dest.issym() assert sym_dest.issym()
orig_umask = os.umask(077)
if sym_dest.getperms() == 0700: self.symlink_perms = 1 if sym_dest.getperms() == 0700: self.symlink_perms = 1
else: self.symlink_perms = 0 else: self.symlink_perms = 0
os.umask(orig_umask)
sym_dest.delete() sym_dest.delete()
sym_source.delete() sym_source.delete()
......
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