Selaa lähdekoodia

libgis(parser): check also PG file

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51125 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 vuotta sitten
vanhempi
commit
7f09b57b2b
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      lib/gis/parser.c

+ 5 - 2
lib/gis/parser.c

@@ -1311,7 +1311,9 @@ static int check_overwrite(void)
 
 	    if (strcmp(age, "new") == 0) {
 		int i;
-		char found = FALSE;
+		char found;
+		
+		found = FALSE;
 		for (i = 0; opt->answers[i]; i++) {
 		    if (strcmp(element, "file") == 0) {
 			if (access(opt->answers[i], F_OK) == 0) {
@@ -1324,7 +1326,8 @@ static int check_overwrite(void)
 		    }
 		    
 		    if (found && strcmp(element, "vector") == 0 &&
-			G_find_file("", "OGR", G_mapset()))
+			(G_find_file("", "OGR", G_mapset()) ||
+			 G_find_file("", "PG", G_mapset())))
 			found = FALSE;
 		    
 		    if (found) {	/* found */