Sfoglia il codice sorgente

fix for ticket https://trac.osgeo.org/grass/ticket/783 (backport from https://trac.osgeo.org/grass/changeset/39541)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39543 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 15 anni fa
parent
commit
b5013137e1
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      raster/r.watershed/front/main.c

+ 12 - 0
raster/r.watershed/front/main.c

@@ -264,13 +264,21 @@ int main(int argc, char *argv[])
     }
 
     /* Build command line */
+#ifdef __MINGW32__
+    sprintf(command, "\"\"%s/etc/", G_gisbase());
+#else
     sprintf(command, "%s/etc/", G_gisbase());
+#endif
 
     if (flag_seg->answer)
 	strcat(command, "r.watershed.seg");
     else
 	strcat(command, "r.watershed.ram");
 
+#ifdef __MINGW32__
+    strcat(command, "\"");
+#endif
+
     if (flag_sfd->answer) {
 	strcat(command, " -s");
     }
@@ -393,6 +401,10 @@ int main(int argc, char *argv[])
 	strcat(command, opt17->answer);
     }
 
+#ifdef __MINGW32__
+    strcat(command, "\"");
+#endif
+
     G_debug(1, "Mode: %s", flag_seg->answer ? "Segmented" : "All in RAM");
     G_debug(1, "Running: %s", command);