Revision: 45450
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45450
Author:   alexk
Date:     2012-04-06 21:11:10 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Temporary gzopen fix for for Windows
If we open file for write, we create a new file and close it. Therefore we have 
existing path for GetShortPathName.

Strangely zlib fails on gzclose if file descriptors are used.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/fileops.c

Modified: trunk/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/fileops.c       2012-04-06 
16:19:30 UTC (rev 45449)
+++ trunk/blender/source/blender/blenlib/intern/fileops.c       2012-04-06 
21:11:10 UTC (rev 45450)
@@ -222,6 +222,11 @@
                wchar_t short_name_16 [256];
                char short_name [256];
                int i=0;
+
+               /* xxx Creates file before transcribing the path */
+               if(mode[0]=='w')
+                       fclose(ufopen(filename,"a"));
+
                UTF16_ENCODE(filename);
 
                GetShortPathNameW(filename_16,short_name_16,256);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to