From f73183ae49dc0713f1a4a45313789ab2c8389f41 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Fri, 10 Jun 2005 13:12:59 +0000 Subject: * fix for bug #2720 --- source/blender/blenlib/intern/util.c | 8 ++------ source/blender/src/toets.c | 3 +++ source/blender/src/usiblender.c | 4 ++++ 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 -- cgit v1.2.3