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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r--source/blender/blenlib/intern/path_util.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 7be8e069bd0..36348f0cbac 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -72,6 +72,7 @@
/* local */
static int add_win32_extension(char *name);
+static char *blender_version_decimal(void);
/* implementation */
@@ -745,17 +746,15 @@ char *BLI_gethome(void) {
ret = getenv("HOME");
if(ret) {
- sprintf(dir, "%s\\.blender", ret);
+ sprintf(dir, "%s\\%s", ret, blender_version_decimal());
if (BLI_exists(dir)) return dir;
}
/* else, check install dir (path containing blender.exe) */
- BLI_getInstallationDir(dir);
-
- if (BLI_exists(dir))
+ if(BLI_getInstallationDir(ret))
{
- strcat(dir,"\\.blender");
+ sprintf(dir, "%s", ret, blender_version_decimal());
if (BLI_exists(dir)) return(dir);
}
@@ -773,7 +772,7 @@ char *BLI_gethome(void) {
sprintf(dir, "%s\\Blender Foundation\\Blender", appdatapath);
BLI_recurdir_fileops(dir);
if (BLI_exists(dir)) {
- strcat(dir,"\\.blender");
+ sprintf(dir,"%s\\%s", dir, blender_version_decimal());
if(BLI_exists(dir)) return(dir);
}
}
@@ -785,7 +784,7 @@ char *BLI_gethome(void) {
sprintf(dir, "%s\\Blender Foundation\\Blender", appdatapath);
BLI_recurdir_fileops(dir);
if (BLI_exists(dir)) {
- strcat(dir,"\\.blender");
+ sprintf(dir,"%s\\%s", dir, blender_version_decimal());
if(BLI_exists(dir)) return(dir);
}
}