diff options
author | Daniel Dunbar <daniel@zuster.org> | 2004-05-11 00:35:46 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2004-05-11 00:35:46 +0400 |
commit | 00b44d4db234d34aa252b6083874fa5be58a5a49 (patch) | |
tree | 8bcbe0d4eb2b8968cb5631e697aff891a15ecfe3 /source | |
parent | 208a2937f70244d7ac0b32935c7f9aeb7b66ddb2 (diff) |
- nasty memory corruption on windows for getting home directory
- check to make sure $HOME/.blender exists before returning that
as the home
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 9c55f617e56..faa7d45fa9d 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -481,7 +481,6 @@ void BLI_splitdirstring(char *di,char *fi) } char *BLI_gethome(void) { - #ifdef __BeOS return "/boot/home/"; /* BeOS 4.5: doubleclick at icon doesnt give home env */ @@ -495,10 +494,8 @@ char *BLI_gethome(void) { ret = getenv("HOME"); if(ret) { - if (BLI_exists(ret)){ - strcat(ret,"\.blender"); - return ret; - } + sprintf(dir, "%s\.blender", ret); + if (BLI_exists(dir)) return dir; } /* add user profile support for WIN 2K / NT */ |