瀏覽代碼

avoid struct stat

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43079 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 年之前
父節點
當前提交
d32b1c0a1d
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      lib/vector/Vlib/open.c

+ 1 - 2
lib/vector/Vlib/open.c

@@ -959,7 +959,6 @@ int Vect_open_sidx(struct Map_info *Map, int mode)
     int err;
     struct Coor_info CInfo;
     struct Plus_head *Plus;
-    struct stat info;
 
     G_debug(1, "Vect_open_sidx(): name = %s mapset= %s mode = %s", Map->name,
 	    Map->mapset, mode == 0 ? "old" : (mode == 1 ? "update" : "new"));
@@ -977,7 +976,7 @@ int Vect_open_sidx(struct Map_info *Map, int mode)
 	sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
 	G__file_name(file_path, buf, GV_SIDX_ELEMENT, Map->mapset);
 
-	if (stat(file_path, &info) != 0)	/* does not exist */
+	if (access(file_path, F_OK) != 0)	/* does not exist */
 	    return 1;
 
 	Map->plus.spidx_fp.file =