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>2005-06-10 17:12:59 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2005-06-10 17:12:59 +0400
commitf73183ae49dc0713f1a4a45313789ab2c8389f41 (patch)
tree919c93f6300e256b899297883f49fc23d8ecc142
parent19cb1ae5e8933d0dbeec2b9fb18f833bb9f67bdc (diff)
* fix for bug #2720
-rw-r--r--source/blender/blenlib/intern/util.c8
-rw-r--r--source/blender/src/toets.c3
-rw-r--r--source/blender/src/usiblender.c4
3 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 6f21e515d9c..2cd0bce93b9 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -651,7 +651,7 @@ void BLI_make_file_string(char *relabase, char *string, char *dir, char *file)
if (!string || !dir || !file) return; /* We don't want any NULLs */
string[0]= 0; /* ton */
-
+
/* we first push all slashes into unix mode, just to make sure we don't get
any mess with slashes later on. -jesterKing */
BLI_char_switch(relabase, '\\', '/');
@@ -684,11 +684,7 @@ void BLI_make_file_string(char *relabase, char *string, char *dir, char *file)
strcat (string, file);
/* Push all slashes to the system preferred direction */
- #ifdef WIN32
- BLI_char_switch(string, '/', '\\');
- #else
- BLI_char_switch(string, '\\', '/');
- #endif
+ BLI_clean(string);
}
int BLI_testextensie(char *str, char *ext)
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index 72bfe0e1ee7..552f846038f 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -986,6 +986,9 @@ int blenderqread(unsigned short event, short val)
if(textspace==0) {
if(G.qual==LR_CTRLKEY) {
if(okee("Erase all")) {
+ strcpy(G.sce, BLI_gethome());
+ strcat(G.sce, "/untitled.blend");
+ BLI_clean(G.sce);
if( BIF_read_homefile()==0) error("No file ~/.B.blend");
}
return 0;
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 9bd34cf5ace..881390677e5 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -274,6 +274,9 @@ int BIF_read_homefile(void)
char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAXDIR];
char *home= BLI_gethome();
int success;
+
+ BLI_clean(home);
+
#if 0
//#ifdef _WIN32 // FULLSCREEN
static int screenmode = -1;
@@ -292,6 +295,7 @@ int BIF_read_homefile(void)
} else {
success = BKE_read_file_from_memory(datatoc_B_blend, datatoc_B_blend_size, NULL);
}
+ BLI_clean(scestr);
strcpy(G.sce, scestr);
#if 0