[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34538] trunk/blender/release/scripts/io/ netrender/utils.py: [#25783] Network rendering fails with windows paths

Martin Poirier theeth at yahoo.com
Fri Jan 28 01:45:53 CET 2011


Revision: 34538
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34538
Author:   theeth
Date:     2011-01-28 00:45:53 +0000 (Fri, 28 Jan 2011)
Log Message:
-----------
[#25783] Network rendering fails with windows paths

Potential fix. Absolute windows path weren't detected as absolute on linux.

Modified Paths:
--------------
    trunk/blender/release/scripts/io/netrender/utils.py

Modified: trunk/blender/release/scripts/io/netrender/utils.py
===================================================================
--- trunk/blender/release/scripts/io/netrender/utils.py	2011-01-28 00:00:10 UTC (rev 34537)
+++ trunk/blender/release/scripts/io/netrender/utils.py	2011-01-28 00:45:53 UTC (rev 34538)
@@ -202,7 +202,10 @@
     
 
 def prefixPath(prefix_directory, file_path, prefix_path, force = False):
-    if os.path.isabs(file_path):
+    if (os.path.isabs(file_path) or
+        len(file_path) >= 3 and (file_path[1:3] == ":/" or file_path[1:3] == ":\\") or # Windows absolute path don't count as absolute on unix, have to handle them myself
+        file_path[0] == "/" or file_path[0] == "\\"): # and vice versa
+
         # if an absolute path, make sure path exists, if it doesn't, use relative local path
         full_path = file_path
         if force or not os.path.exists(full_path):




More information about the Bf-blender-cvs mailing list