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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-21 21:37:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-21 21:37:38 +0400
commit00735ed9e49d2103e06b0e25513b5b880f0db226 (patch)
treec7138c391136a658698b3195635d6d2298ecb51f /source/blender/windowmanager
parent4d48dbe5fd553ab149abd1f062eec08ae813060a (diff)
Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c9
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 9b2d7026a46..4cd31b8d894 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -289,8 +289,9 @@ static void wm_init_userdef(bContext *C)
if ((U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0) G.f |= G_SCRIPT_AUTOEXEC;
else G.f &= ~G_SCRIPT_AUTOEXEC;
}
+
/* update tempdir from user preferences */
- BLI_where_is_temp(btempdir, FILE_MAX, 1);
+ BLI_init_temporary_dir(U.tempdir);
}
@@ -856,14 +857,14 @@ void wm_autosave_location(char *filepath)
* BLI_make_file_string will create string that has it most likely on C:\
* through get_default_root().
* If there is no C:\tmp autosave fails. */
- if (!BLI_exists(btempdir)) {
+ if (!BLI_exists(BLI_temporary_dir())) {
savedir = BLI_get_folder_create(BLENDER_USER_AUTOSAVE, NULL);
BLI_make_file_string("/", filepath, savedir, pidstr);
return;
}
#endif
- BLI_make_file_string("/", filepath, btempdir, pidstr);
+ BLI_make_file_string("/", filepath, BLI_temporary_dir(), pidstr);
}
void WM_autosave_init(wmWindowManager *wm)
@@ -921,7 +922,7 @@ void wm_autosave_delete(void)
if(BLI_exists(filename)) {
char str[FILE_MAXDIR+FILE_MAXFILE];
- BLI_make_file_string("/", str, btempdir, "quit.blend");
+ BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
/* if global undo; remove tempsave, otherwise rename */
if(U.uiflag & USER_GLOBALUNDO) BLI_delete(filename, 0, 0);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a06da3941af..5fee5fb2a57 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1807,7 +1807,7 @@ static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_WINDOW, NULL);
/* load file */
- BLI_make_file_string("/", filename, btempdir, "quit.blend");
+ BLI_make_file_string("/", filename, BLI_temporary_dir(), "quit.blend");
WM_read_file(C, filename, op->reports);
G.fileflags &= ~G_FILE_RECOVER;