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-03-20 06:17:37 +0400
committerAlexander Kuznetsov <kuzsasha@gmail.com>2012-03-20 06:17:37 +0400
commitf11a6d3a847e8e18faefd8694373d2f11b5ec802 (patch)
treeb4bec6dcfd28e3da4fa1e84ee4bd20fa0a21be39 /source/blender/windowmanager/intern/wm_files.c
parentdeea1f38b1ec0ccba283abeb63506cbc15e093d5 (diff)
Adds support for utf paths on Windows.
Not all file formats/calls are supported yet. It will be expended. Please from now on use BLI_fopen, BLI_* for file manipulations. For non-windows systems BLI_fopen just calls fopen. For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 1e2c48f4e7f..5384d6ef8f7 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -304,6 +304,7 @@ static void wm_init_userdef(bContext *C)
#define BKE_READ_EXOTIC_OK_BLEND 0 /* .blend file */
#define BKE_READ_EXOTIC_OK_OTHER 1 /* other supported formats */
+
/* intended to check for non-blender formats but for now it only reads blends */
static int wm_read_exotic(Scene *UNUSED(scene), const char *name)
{
@@ -319,8 +320,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name)
retval= BKE_READ_EXOTIC_FAIL_PATH;
}
else {
- gzfile = gzopen(name,"rb");
-
+ gzfile = BLI_gzopen(name,"rb");
if (gzfile == NULL) {
retval= BKE_READ_EXOTIC_FAIL_OPEN;
}
@@ -627,7 +627,7 @@ static void write_history(void)
recent = G.recent_files.first;
/* refresh recent-files.txt of recent opened files, when current file was changed */
if(!(recent) || (BLI_path_cmp(recent->filepath, G.main->name)!=0)) {
- fp= fopen(name, "w");
+ fp= BLI_fopen(name, "w");
if (fp) {
/* add current file to the beginning of list */
recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile");