Skip to content

Commit

Permalink
Fix network share failures on localized windows systems
Browse files Browse the repository at this point in the history
  • Loading branch information
kalemas committed Aug 28, 2024
1 parent d834a92 commit 2acf25b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/studiolibrary/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,10 +1252,11 @@ def walkup(path, match=None, depth=3, sep="/"):
except PermissionError:
continue # expected on network shares
except OSError as e:
if 'unexpected network error' in e.strerror:
continue # expected on network shares
if 'handle is invalid' in e.strerror:
continue # something weird on network share
if getattr(e, 'winerror', None) == 59:
continue # "An unexpected network error occurred"
if getattr(e, 'winerror', None) == 6:
# "The handle is invalid" - something weird on network share
continue
raise
for filename in filenames:
path = os.path.join(folder, filename)
Expand Down

0 comments on commit 2acf25b

Please sign in to comment.