소스 검색

libgis: fix https://trac.osgeo.org/grass/changeset/34486

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58101 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 11 년 전
부모
커밋
790e6004da
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      lib/gis/mapset_nme.c

+ 5 - 5
lib/gis/mapset_nme.c

@@ -23,7 +23,6 @@ static struct state {
 	int count;
 	int size;
     } path, path2;
-    int initialized;
 } state;
 
 static struct state *st = &state;
@@ -55,9 +54,13 @@ void G_get_list_of_mapsets(void)
     FILE *fp;
     const char *cur;
 
-    if (G_is_initialized(&st->initialized))
+    if (st->path.count > 0)
 	return;
 
+    st->path.count = 0;
+    st->path.size = 0;
+    st->path.names = NULL;
+
     cur = G_mapset();
     new_mapset(cur);
 
@@ -77,8 +80,6 @@ void G_get_list_of_mapsets(void)
 	if (strcmp(perm, cur) != 0 && G__mapset_permissions(perm) >= 0)
 	    new_mapset(perm);
     }
-
-    G_initialize_done(&st->initialized);
 }
 
 static void new_mapset(const char *name)
@@ -102,7 +103,6 @@ void G__create_alt_search_path(void)
     st->path2.names = st->path.names;
 
     st->path.count = 0;
-    st->initialized = 0;
 }
 
 /*!