[GRASS-SVN] r51125 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 21 07:05:18 EDT 2012


Author: martinl
Date: 2012-03-21 04:05:18 -0700 (Wed, 21 Mar 2012)
New Revision: 51125

Modified:
   grass/trunk/lib/gis/parser.c
Log:
libgis(parser): check also PG file


Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2012-03-21 11:04:49 UTC (rev 51124)
+++ grass/trunk/lib/gis/parser.c	2012-03-21 11:05:18 UTC (rev 51125)
@@ -1311,7 +1311,9 @@
 
 	    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 @@
 		    }
 		    
 		    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 */



More information about the grass-commit mailing list