* fix for bug #2720
authorNathan Letwory <nathan@letworyinteractive.com>
Fri, 10 Jun 2005 13:12:59 +0000 (13:12 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Fri, 10 Jun 2005 13:12:59 +0000 (13:12 +0000)
source/blender/blenlib/intern/util.c
source/blender/src/toets.c
source/blender/src/usiblender.c

index 6f21e515d9c2c16d828c0739f9cd416ed8faa65b..2cd0bce93b9ce1433a0ffcd78ab07e927bde0ed9 100644 (file)
@@ -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)
index 72bfe0e1ee7989fb38262e1c224c851f7b5b6b8c..552f846038fe0b99c33d5e29202f64ad97573b90 100644 (file)
@@ -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;
index 9bd34cf5ace39744672bd96ba2c1a632ec9b4305..881390677e5e9336ed268752be93ad1f77e0a799 100644 (file)
@@ -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