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:
authorAlexander Kuznetsov <kuzsasha@gmail.com>2012-04-07 01:11:10 +0400
committerAlexander Kuznetsov <kuzsasha@gmail.com>2012-04-07 01:11:10 +0400
commit628b183d98f55a71ad22dd9c742c2318ed7c72e6 (patch)
tree9651c0fd1ad3c6f72939acf561c42b5dcd480813 /source/blender/blenlib/intern/fileops.c
parentee307bec882a639c4574480dc7d0505b9812b8dc (diff)
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.
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index edb2daf2d62..90ced266e7f 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -222,6 +222,11 @@ gzFile BLI_gzopen(const char *filename, const char *mode)
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);