diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-07-16 01:39:47 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-07-16 01:39:47 +0400 |
commit | 615db01b01c4ad96d8e712aa5469d9eb3ada0d07 (patch) | |
tree | 3a067eb23e558931a7910eccac0070912ddf6dbf /source/blender/windowmanager | |
parent | 2f96ac8b9ff6290e2a63546cdab168e4376f3128 (diff) |
== installation paths ==
* fix for autosave location -> shouldn't use BLI_gethome anymore
* this frees BLI_gethome of having to emulate the local->user->system search path and can now be truly considered as 'home/default location for .blend files'
* removed setting the default G.sce from read_history, was out of context there.
* fix for creating user dir, leftover from previous commit.
jesterKing, please review -> if there are any issues I will fix or revert.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 4 |
2 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index ff859ebe166..89b8267bb05 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -434,9 +434,6 @@ void read_history(void) num++; } } - - if(G.sce[0] == 0) - BLI_make_file_string("/", G.sce, BLI_gethome(), "untitled.blend"); BLI_free_file_lines(lines); @@ -686,21 +683,14 @@ void wm_autosave_location(char *filename) { char pidstr[32]; #ifdef WIN32 - char subdir[9]; - char savedir[FILE_MAXDIR]; + char *savedir; #endif sprintf(pidstr, "%d.blend", abs(getpid())); #ifdef WIN32 if (!BLI_exists(U.tempdir)) { - BLI_strncpy(subdir, "autosave", sizeof(subdir)); - BLI_make_file_string("/", savedir, BLI_gethome(), subdir); - - /* create a new autosave dir - * function already checks for existence or not */ - BLI_recurdir_fileops(savedir); - + savedir = BLI_get_folder_create(BLENDER_USER_AUTOSAVE, NULL); BLI_make_file_string("/", filename, savedir, pidstr); return; } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index db668390b88..5bfaf91aa11 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -164,6 +164,10 @@ void WM_init(bContext *C, int argc, char **argv) G.ndofdevice = -1; /* XXX bad initializer, needs set otherwise buttons show! */ read_history(); + + if(G.sce[0] == 0) + BLI_make_file_string("/", G.sce, BLI_gethome(), "untitled.blend"); + BLI_strncpy(G.lib, G.sce, FILE_MAX); } |