428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
rc = system(zNewCmd);
free(zNewCmd);
#else
/* On unix, evaluate the command directly.
*/
rc = system(zOrigCmd);
#endif
return rc;
|
>
|
>
|
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
|
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
char *zMbcs = fossil_utf8_to_mbcs(zNewCmd);
rc = system(zMbcs);
fossil_mbcs_free(zMbcs);
free(zNewCmd);
#else
/* On unix, evaluate the command directly.
*/
rc = system(zOrigCmd);
#endif
return rc;
|