浏览代码

libgis: G_parser(): don't call G_find_file() for element 'mapset'

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55612 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
c6f41c4b72
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      lib/gis/parser.c

+ 5 - 2
lib/gis/parser.c

@@ -1328,8 +1328,11 @@ static int check_overwrite(void)
                         if (access(opt->answers[i], F_OK) == 0)
                             found = TRUE;
 		    }
-                    else if (G_find_file(element, opt->answers[i], G_mapset())) {
-			found = TRUE;
+                    else if (strcmp(element, "mapset") != 0) {
+                        /* TOD0: other elements should be probably skipped */
+                        if (G_find_file(element, opt->answers[i], G_mapset())) {
+                            found = TRUE;
+                        }
 		    }
                     
 		    if (found) {	/* found */