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:
authorNathan Letwory <nathan@letworyinteractive.com>2004-01-08 00:03:11 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2004-01-08 00:03:11 +0300
commit1126706d2ea21c131fd315e2b02996d546d29ce6 (patch)
tree9790858d809d73de072f524b0c97b8ecaeb56362
parentf2f514d1d432c8c3fd018f2b55ceb2555fbdf686 (diff)
- [win32] now really using the directory Blender is installed in. My patch was kinda incomplete, but aphex_ (Simon) was kind enough to point out the lines to edit :)
-rw-r--r--source/blender/blenlib/intern/util.c4
-rw-r--r--source/blender/blenlib/intern/winstuff.c3
-rw-r--r--source/blender/blenloader/intern/writefile.c2
-rw-r--r--source/blender/src/usiblender.c2
4 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 4bf44e8df6a..49e2cc7f8fb 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -509,10 +509,10 @@ char *BLI_gethome(void) {
{
//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/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 59212ee444c..64a56b9a306 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -51,9 +51,12 @@
int BLI_getInstallationDir( char * str ) {
char dir[FILE_MAXDIR];
char file[FILE_MAXFILE];
+ int a;
GetModuleFileName(NULL,str,FILE_MAXDIR+FILE_MAXFILE);
BLI_split_dirfile(str,dir,file);
+ a = strlen(dir);
+ if(dir[a-1] == '\\') dir[a-1]=0;
strcpy(str,dir);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ffb17081854..25f4fa28f8e 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1612,7 +1612,7 @@ int BLO_write_file(char *dir, int write_flags, char **error_r)
BLI_getInstallationDir(tmpdir);
if(BLI_exists(tmpdir))
- strcat(tmpdir,".blender/");
+ strcat(tmpdir,"/.blender/");
BLI_make_file_string(G.sce, userfilename, tmpdir, ".B.blend");
#else
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 3ed78ec5839..9307359c205 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -423,7 +423,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