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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-01 11:28:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-01 11:28:37 +0300
commitc8de6195c84caaa9abeb968047512fe8795d16c1 (patch)
tree1cc358c9b9c1ebc9c6d84fd3a8d255995118e7f9
parentb4246549e7cd176f72dc1a9aa1f8b67a43e83311 (diff)
fix [#26252] Py error when installing addon through UI
Py3.1 for windows doesn't have os.path.samefile(), has been added in 3.2.
-rw-r--r--release/scripts/ui/space_userpref.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 93985591824..4f444a8e253 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -1089,7 +1089,8 @@ class WM_OT_addon_install(bpy.types.Operator):
addon_path = ""
pyfile_dir = os.path.dirname(pyfile)
for addon_path in addon_utils.paths():
- if os.path.samefile(pyfile_dir, addon_path):
+ # if os.path.samefile(pyfile_dir, addon_path): # Py3.2 only!, upgrade soon!
+ if (hasattr(os.path, "samefile") and os.path.samefile(pyfile_dir, addon_path)) or pyfile_dir == addon_path:
self.report({'ERROR'}, "Source file is in the addon search path: %r" % addon_path)
return {'CANCELLED'}
del addon_path