diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-21 21:37:38 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-21 21:37:38 +0400 |
commit | 00735ed9e49d2103e06b0e25513b5b880f0db226 (patch) | |
tree | c7138c391136a658698b3195635d6d2298ecb51f /source/blender/blenkernel | |
parent | 4d48dbe5fd553ab149abd1f062eec08ae813060a (diff) |
Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 5358a26e660..7a675dc64c3 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -549,7 +549,7 @@ void BKE_write_undo(bContext *C, const char *name) counter= counter % U.undosteps; BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter); - BLI_make_file_string("/", filepath, btempdir, numstr); + BLI_make_file_string("/", filepath, BLI_temporary_dir(), numstr); /* success= */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL); @@ -719,7 +719,7 @@ void BKE_undo_save_quit(void) /* no undo state to save */ if(undobase.first==undobase.last) return; - BLI_make_file_string("/", str, btempdir, "quit.blend"); + BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend"); file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666); if(file == -1) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index bd5e5dc6049..f12e9698810 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -923,8 +923,8 @@ static int ptcache_path(PTCacheID *pid, char *filename) } /* use the temp path. this is weak but better then not using point cache at all */ - /* btempdir is assumed to exist and ALWAYS has a trailing slash */ - BLI_snprintf(filename, MAX_PTCACHE_PATH, "%s"PTCACHE_PATH"%d", btempdir, abs(getpid())); + /* temporary directory is assumed to exist and ALWAYS has a trailing slash */ + BLI_snprintf(filename, MAX_PTCACHE_PATH, "%s"PTCACHE_PATH"%d", BLI_temporary_dir(), abs(getpid())); return BLI_add_slash(filename); /* new strlen() */ } |