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:
parent
9225697053
commit
db0901b1de
@ -31,6 +31,10 @@ class DeletionOptions(GUIObject):
|
|||||||
try:
|
try:
|
||||||
os.symlink()
|
os.symlink()
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
|
# Windows XP, not supported
|
||||||
|
return False
|
||||||
|
except OSError:
|
||||||
|
# Vista+, symbolic link privilege not held
|
||||||
return False
|
return False
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# wrong number of arguments
|
# wrong number of arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user