[GRASS-SVN] r43071 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 12 13:22:12 EDT 2010
Author: mmetz
Date: 2010-08-12 17:22:12 +0000 (Thu, 12 Aug 2010)
New Revision: 43071
Modified:
grass/trunk/lib/vector/Vlib/close.c
Log:
avoid struct stat
Modified: grass/trunk/lib/vector/Vlib/close.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close.c 2010-08-12 17:21:55 UTC (rev 43070)
+++ grass/trunk/lib/vector/Vlib/close.c 2010-08-12 17:22:12 UTC (rev 43071)
@@ -75,21 +75,20 @@
Map->plus.built == GV_BUILD_ALL) {
char buf[GPATH_MAX];
char file_path[GPATH_MAX];
- struct stat info;
/* Delete old support files if available */
sprintf(buf, "%s/%s", GV_DIRECTORY, Map->name);
G__file_name(file_path, buf, GV_TOPO_ELEMENT, G_mapset());
- if (stat(file_path, &info) == 0) /* file exists? */
+ if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
G__file_name(file_path, buf, GV_SIDX_ELEMENT, G_mapset());
- if (stat(file_path, &info) == 0) /* file exists? */
+ if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
G__file_name(file_path, buf, GV_CIDX_ELEMENT, G_mapset());
- if (stat(file_path, &info) == 0) /* file exists? */
+ if (access(file_path, F_OK) == 0) /* file exists? */
unlink(file_path);
Vect_coor_info(Map, &CInfo);
More information about the grass-commit
mailing list