[ #4786 ] if space in the Application path name, system() doesn't work on some platforms
[blender.git] / source / blender / src / filesel.c
index 10af190c4dc81f783af911386298bb256e813351..760e200ee269f619d00b8dd73a5845ef851317ca 100644 (file)
@@ -2222,8 +2222,11 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                case PKEY:
                        if(G.qual & LR_SHIFTKEY) {
                                extern char bprogname[];        /* usiblender.c */
                case PKEY:
                        if(G.qual & LR_SHIFTKEY) {
                                extern char bprogname[];        /* usiblender.c */
-                       
+#ifdef WIN32                   
                                sprintf(str, "%s -a \"%s%s\"", bprogname, sfile->dir, sfile->file);
                                sprintf(str, "%s -a \"%s%s\"", bprogname, sfile->dir, sfile->file);
+#else
+                               sprintf(str, "\"%s\" -a \"%s%s\"", bprogname, sfile->dir, sfile->file);
+#endif
                                system(str);
                        }
                        else 
                                system(str);
                        }
                        else