diff options
author | Simon Clitherow <aphex@nildram.co.uk> | 2003-08-11 22:53:23 +0400 |
---|---|---|
committer | Simon Clitherow <aphex@nildram.co.uk> | 2003-08-11 22:53:23 +0400 |
commit | 258bc61e2a97f37fb39112c1b47f6e3c0f7cf2db (patch) | |
tree | 9d21fae9d8f04b3baa0f9a41c33eab856a4a262f | |
parent | 159f53f0a07b7519795b0bd6ac63e8fc05bceca9 (diff) |
- Fix bug #250:
Blender no longer uses the windows dir as %HOME%
This also fixes the ".blanguage not found" errors when
double-clicking .blend files. (Win32)
Needs testing at Win2k/XP!!!
-rw-r--r-- | source/blender/blenlib/intern/util.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 484a3377942..667b516decb 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -496,8 +496,22 @@ char *BLI_gethome(void) { if(ret) { if (BLI_exists(ret)) return ret; } - - // add user profile support for WIN 2K / NT + + BLI_getInstallationDir(dir); + + if (BLI_exists(dir)) + { + strcat(dir,"/.blender/"); + return(dir); + } + + /* + everything below this point to be removed - + blender should use the same %HOME% across + all versions of Windows... (aphex) + */ + + /* add user profile support for WIN 2K / NT */ ret = getenv("USERPROFILE"); if (ret) { if (BLI_exists(ret)) { /* from fop, also below... */ @@ -510,6 +524,11 @@ char *BLI_gethome(void) { } } } + + /* + Saving in the Windows dir is less than desirable. + Use as a last resort ONLY! (aphex) + */ ret = getenv("WINDOWS"); if (ret) { @@ -521,7 +540,7 @@ char *BLI_gethome(void) { if(BLI_exists(ret)) return ret; } - return "C:\\Temp"; + return "C:\\Temp"; /* sheesh! bad, bad, bad! (aphex) */ #endif } |