Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-07-30 17:35:19 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-07-30 17:35:19 +0400
commit3a58c4679ae0405ba818d097b3566ca7a332bc0e (patch)
treeb7a3f91e6116fe4900892397109c68c901124aa4 /release
parent74758576fc9c1220563c86ce47a17c51d08a6d4f (diff)
Fix addon crash when trying listdir a directory we have no permission to.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy/path.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index ccc9df93b0d..874efc2e131 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -219,7 +219,10 @@ def resolve_ncase(path):
# we are expecting 'dirpath' to be a directory, but it could be a file
if _os.path.isdir(dirpath):
- files = _os.listdir(dirpath)
+ try:
+ files = _os.listdir(dirpath)
+ except PermissionError: # We might not have the permission to list dirpath...
+ return path, False
else:
return path, False