Bugfix for:
authorAlexander Ewering <blender@instinctive.de>
Sat, 18 Nov 2006 01:45:47 +0000 (01:45 +0000)
committerAlexander Ewering <blender@instinctive.de>
Sat, 18 Nov 2006 01:45:47 +0000 (01:45 +0000)
http://projects.blender.org/tracker/index.php?func=detail&aid=4786&group_id=9&atid=125

If the path to Blender contained whitespace, various places which called
the Blender executable wouldn't run. Now the path to the executable
should be quoted correctly everywhere.

If this breaks anything on other platforms, please shout :)

source/blender/python/api2_2x/sceneRender.c
source/blender/src/buttons_scene.c
source/blender/src/editimasel.c
source/blender/src/filesel.c

index 8ef3c09ab002deafbcc9864fd8f2ea9c94adf51f..de5dd1c5f1e56242b3d44b60056791843cd0186e 100644 (file)
@@ -514,14 +514,14 @@ PyObject *RenderData_Play( BPy_RenderData * self )
        }
        if( BLI_exist( file ) ) {
                calc_renderwin_rectangle(640, 480, G.winpos, pos, size);
-               sprintf( str, "%s -a -p %d %d \"%s\"", bprogname, pos[0],
+               sprintf( str, "\"%s\" -a -p %d %d \"%s\"", bprogname, pos[0],
                         pos[1], file );
                system( str );
        } else {
                BKE_makepicstring( file, G.scene->r.pic, self->renderContext->sfra, G.scene->r.imtype);
                if( BLI_exist( file ) ) {
                        calc_renderwin_rectangle(640, 480, G.winpos, pos, size);
-                       sprintf( str, "%s -a -p %d %d \"%s\"", bprogname,
+                       sprintf( str, "\"%s\" -a -p %d %d \"%s\"", bprogname,
                                 pos[0], pos[1], file );
                        system( str );
                } else
index 807320ca060d98976f763899cb1aae862b2128e1..19e23f233773226004ff39fa478af267629d00b4 100644 (file)
@@ -483,7 +483,7 @@ static void run_playanim(char *file)
        calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100, 
                                                         (G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
 
-       sprintf(str, "%s -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
+       sprintf(str, "\"%s\" -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
        system(str);
 }
 
index 3d2b3c8b715ea6aac3b6bb4b52ced03221370cdd..70572673d43bed847ca25ffcfe7f08b6b5d0e62d 100644 (file)
@@ -341,7 +341,7 @@ void winqreadimaselspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                if(G.qual & LR_SHIFTKEY) {
                        extern char bprogname[];        /* usiblender.c */
                        
-                       sprintf(name, "%s -a \"%s%s\"", bprogname, simasel->dir, simasel->file);
+                       sprintf(name, "\"%s\" -a \"%s%s\"", bprogname, simasel->dir, simasel->file);
                        system(name);
                }
                if(G.qual & LR_CTRLKEY) {
index 7d25ca4dc5ed7deabd8f25d6043ee884161ea180..0e76083c08eb518694911540569fa36594d504f0 100644 (file)
@@ -2105,7 +2105,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                        if(G.qual & LR_SHIFTKEY) {
                                extern char bprogname[];        /* usiblender.c */
                        
-                               sprintf(str, "%s -a \"%s%s\"", bprogname, sfile->dir, sfile->file);
+                               sprintf(str, "\"%s\" -a \"%s%s\"", bprogname, sfile->dir, sfile->file);
                                system(str);
                        }
                        else