Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2004-05-11 00:35:46 +0400
committerDaniel Dunbar <daniel@zuster.org>2004-05-11 00:35:46 +0400
commit00b44d4db234d34aa252b6083874fa5be58a5a49 (patch)
tree8bcbe0d4eb2b8968cb5631e697aff891a15ecfe3 /source
parent208a2937f70244d7ac0b32935c7f9aeb7b66ddb2 (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.c7
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 */