Move copying of %TEMP% to U.tempdir after slash adding. Otherwise path is handled...
authorNathan Letwory <nathan@letworyinteractive.com>
Tue, 28 Sep 2010 00:14:02 +0000 (00:14 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Tue, 28 Sep 2010 00:14:02 +0000 (00:14 +0000)
source/blender/blenlib/intern/path_util.c

index ac4af56..5c9086c 100644 (file)
@@ -1632,7 +1632,6 @@ void BLI_where_is_temp(char *fullname, int usertemp)
                char *tmp = getenv("TEMP"); /* Windows */
                if (tmp && BLI_is_dir(tmp)) {
                        strcpy(fullname, tmp);
-                       strcpy(U.tempdir, fullname); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
                }
        }
 #else
@@ -1657,6 +1656,9 @@ void BLI_where_is_temp(char *fullname, int usertemp)
        } else {
                /* add a trailing slash if needed */
                BLI_add_slash(fullname);
+#ifdef WIN32
+               strcpy(U.tempdir, fullname); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
+#endif
        }
 }