[Bf-blender-cvs] [df29e9c070a] master: Fix T71596: Bug in io_utils api breaking only on windows.

Bastien Montagne noreply at git.blender.org
Mon Dec 2 18:13:26 CET 2019


Commit: df29e9c070a2fe00591747828498b671e8b2b4db
Author: Bastien Montagne
Date:   Mon Dec 2 18:09:47 2019 +0100
Branches: master
https://developer.blender.org/rBdf29e9c070a2fe00591747828498b671e8b2b4db

Fix T71596: Bug in io_utils api breaking only on windows.

Stupid mistake, 'original' filepath is a blender-flavored one, with
potentially weird things like the '//' relative 'header'... This can
work on linux (also it could have broken in other places too), but on
windows that is fully invalid path and python `os.path` library just
generates empty result here.

Simply using proper valid path instead fixes it...

===================================================================

M	release/scripts/modules/bpy_extras/io_utils.py

===================================================================

diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 380b63066ef..19697b25f70 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -465,7 +465,7 @@ def path_reference(
         if copy_subdir:
             subdir_abs = os.path.join(subdir_abs, copy_subdir)
 
-        filepath_cpy = os.path.join(subdir_abs, os.path.basename(filepath))
+        filepath_cpy = os.path.join(subdir_abs, os.path.basename(filepath_abs))
 
         copy_set.add((filepath_abs, filepath_cpy))



More information about the Bf-blender-cvs mailing list