From db0901b1ded1b57697de4a61fd7ba3395016f615 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 14 Jul 2013 13:59:03 -0400 Subject: [PATCH] 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. --- core/gui/deletion_options.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/gui/deletion_options.py b/core/gui/deletion_options.py index c2ccceb2..217089c2 100644 --- a/core/gui/deletion_options.py +++ b/core/gui/deletion_options.py @@ -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