1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-10-31 22:05:58 +00:00

Handle OSError during symlink support check

Under a windows that supports symlinks (Vista+), we still need
proper privileges. If we don't have it, OSError is raised and we
need to correctly handle this case. Ref #220.
This commit is contained in:
Virgil Dupras 2013-07-14 13:59:03 -04:00
parent 9225697053
commit db0901b1de

View File

@ -31,6 +31,10 @@ class DeletionOptions(GUIObject):
try:
os.symlink()
except NotImplementedError:
# Windows XP, not supported
return False
except OSError:
# Vista+, symbolic link privilege not held
return False
except TypeError:
# wrong number of arguments