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:
-rw-r--r--source/blender/blenlib/intern/fileops.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index ae6404153c8..a8e233d214b 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -247,15 +247,25 @@ void *BLI_gzopen(const char *filename, const char *mode)
return 0;
}
else {
- char short_name[256];
-
/* xxx Creates file before transcribing the path */
if (mode[0] == 'w')
fclose(ufopen(filename, "a"));
- BLI_get_short_name(short_name, filename);
+ /* temporary #if until we update all libraries to 1.2.7
+ * for correct wide char path handling */
+#if ZLIB_VERNUM >= 0x1270
+ UTF16_ENCODE(filename);
+
+ gzfile = gzopen_w(filename_16, mode);
- gzfile = gzopen(short_name, mode);
+ UTF16_UN_ENCODE(filename);
+#else
+ {
+ char short_name[256];
+ BLI_get_short_name(short_name, filename);
+ gzfile = gzopen(short_name, mode);
+ }
+#endif
}
return gzfile;