diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-02-21 11:43:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-02-21 11:43:13 +0300 |
commit | 7c7a931fed41dcf51e2d537a9157c357f0285955 (patch) | |
tree | 956105c8e2ab7f8553bccb963a1630d54dc3d2b0 /source/blender/blenlib/intern/util.c | |
parent | 91d44a91249355827b6f135ab6e4fc52bfe926e4 (diff) |
made auto threads default (noob's get faster renders in their dual core CPU's)
changed env variable check order $TMP, $TMPDIR - aparently $TMP is more common.
Diffstat (limited to 'source/blender/blenlib/intern/util.c')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index c3917178347..8480a9d6e06 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1615,25 +1615,30 @@ void BLI_where_is_temp(char *fullname, int usertemp) strcpy(fullname, U.tempdir); } - if (fullname[0] == '\0') { + #ifdef WIN32 + if (fullname[0] == '\0') { char *tmp = getenv("TEMP"); /* Windows */ if (tmp && BLI_exists(tmp)) { strcpy(fullname, tmp); } + } #else - char *tmp = getenv("TMPDIR"); /* Other OS's - Try TMP and TMPDIR */ + /* Other OS's - Try TMP and TMPDIR */ + if (fullname[0] == '\0') { + char *tmp = getenv("TMP"); if (tmp && BLI_exists(tmp)) { strcpy(fullname, tmp); } - if (fullname[0] == '\0') { - tmp = getenv("TMP"); - if (tmp && BLI_exists(tmp)) { - strcpy(fullname, tmp); - } + } + + if (fullname[0] == '\0') { + char *tmp = getenv("TMPDIR"); + if (tmp && BLI_exists(tmp)) { + strcpy(fullname, tmp); } -#endif } +#endif if (fullname[0] == '\0') { strcpy(fullname, "/tmp/"); |