Diff
Not logged in

Differences From:

File src/diffcmd.c part of check-in [129edda98e] - Update to the latest SQLite. Fix a bug in the "diff" and "gdiff" commands. Fix a bug that prevented "fossil config pull" from working. by drh on 2009-09-11 15:06:34. [view]

To:

File src/diffcmd.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/diffcmd.c part of check-in [0eb08b860c] - Change more system() calls into portable_system() in an effort to fix path quoting problems on windows. by drh on 2009-09-16 21:29:18. [view]

@@ -101,9 +101,9 @@
       );
       shell_escape(&cmd, zFullName);
       printf("%s\n", blob_str(&cmd));
       fflush(stdout);
-      system(blob_str(&cmd));
+      portable_system(blob_str(&cmd));
     }
     free(zFullName);
   }
   db_finalize(&q);
@@ -222,18 +222,20 @@
 
 /*
 ** This function implements a cross-platform "system()" interface.
 */
-void portable_system(char *zOrigCmd){
+int portable_system(char *zOrigCmd){
+  int rc;
 #ifdef __MINGW32__
   /* 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);
-  system(zNewCmd);
+  rc = system(zNewCmd);
   free(zNewCmd);
 #else
   /* On unix, evaluate the command directly.
   */
-  system(zOrigCmd);
+  rc = system(zOrigCmd);
 #endif
+  return rc;
 }