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:
authorSimon Clitherow <aphex@nildram.co.uk>2003-10-25 18:09:18 +0400
committerSimon Clitherow <aphex@nildram.co.uk>2003-10-25 18:09:18 +0400
commit066df297b5a3f4408fede3a014689915504f27ad (patch)
treeb9db796d25f91b7f6c3c20b254e4bef15c1945a3
parent084cb3aadc22f48396c3f8d2ef817c03feeb3104 (diff)
- fixed a bug when saving user defaults (Win32 only)
(the first save didn't store paths or font settings!) This is something I broke back at 2.28a :) I'm suprised there were no bug reports on this, but it's fixed now! ;)
-rw-r--r--source/blender/blenlib/intern/util.c6
-rw-r--r--source/blender/blenloader/intern/writefile.c13
-rw-r--r--source/blender/src/usiblender.c2
3 files changed, 17 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 7304f2e970c..a90cf21aa6c 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -507,12 +507,12 @@ char *BLI_gethome(void) {
if (BLI_exists(dir))
{
- //strcat(dir,"/.blender/");
+ //strcat(dir,".blender/");
strcpy(tmpdir,dir);
- strcat(tmpdir,"/.blender/.B.blend");
+ strcat(tmpdir,".blender/.B.blend");
if (BLI_exists(tmpdir))
{
- strcat(dir,"/.blender/");
+ strcat(dir,".blender/");
return(dir);
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 4d11e6d7041..e10f0170db7 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1593,6 +1593,9 @@ int BLO_write_file(char *dir, int write_flags, char **error_r)
char userfilename[FILE_MAXDIR+FILE_MAXFILE];
char tempname[FILE_MAXDIR+FILE_MAXFILE];
int file, fout, write_user_block;
+#ifdef WIN32
+ char tmpdir[FILE_MAXDIR+FILE_MAXFILE];
+#endif
sprintf(tempname, "%s@", dir);
@@ -1602,7 +1605,17 @@ int BLO_write_file(char *dir, int write_flags, char **error_r)
return 0;
}
+#ifdef WIN32
+ BLI_getInstallationDir(tmpdir);
+
+ if(BLI_exists(tmpdir))
+ strcat(tmpdir,".blender/");
+
+ BLI_make_file_string(G.sce, userfilename, tmpdir, ".B.blend");
+#else
BLI_make_file_string(G.sce, userfilename, BLI_gethome(), ".B.blend");
+#endif
+
write_user_block= BLI_streq(dir, userfilename);
fout= write_file_handle(file, write_user_block, write_flags);
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 11283f26d0f..375d12cb7bb 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -420,7 +420,7 @@ void BIF_write_homefile(void)
char dir[FILE_MAXDIR+FILE_MAXFILE];
BLI_getInstallationDir(dir);
- strcat(dir,"/.blender/");
+ strcat(dir,".blender/");
BLI_make_file_string("/", tstr, dir, ".B.blend");
#else