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>2013-08-18 19:17:33 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-08-18 19:17:33 +0400
commita567dd20c0a1ecfd690af40474640b8a3d9afa50 (patch)
treee88f4d835a411ebedd3a0db8bbf0085d61fb3dec /release/scripts/modules/bpy_extras/io_utils.py
parentc5e14f62a673507a6298bf9f676f6de11d193f07 (diff)
More "relpath" try/except protection...
Diffstat (limited to 'release/scripts/modules/bpy_extras/io_utils.py')
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index eeaa6408268..790233c40af 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -409,7 +409,10 @@ def path_reference(filepath,
if mode == 'ABSOLUTE':
return filepath_abs
elif mode == 'RELATIVE':
- return os.path.relpath(filepath_abs, base_dst)
+ try: # can't always find the relative path (between drive letters on windows)
+ return os.path.relpath(filepath_abs, base_dst)
+ except ValueError:
+ return filepath_abs
elif mode == 'STRIP':
return os.path.basename(filepath_abs)