[GRASS-SVN] r43070 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 12 13:21:55 EDT 2010
Author: mmetz
Date: 2010-08-12 17:21:55 +0000 (Thu, 12 Aug 2010)
New Revision: 43070
Modified:
grass/trunk/lib/vector/Vlib/map.c
Log:
avoid struct stat
Modified: grass/trunk/lib/vector/Vlib/map.c
===================================================================
--- grass/trunk/lib/vector/Vlib/map.c 2010-08-12 17:14:36 UTC (rev 43069)
+++ grass/trunk/lib/vector/Vlib/map.c 2010-08-12 17:21:55 UTC (rev 43070)
@@ -225,7 +225,6 @@
struct Map_info In, Out;
struct field_info *Fi, *Fin;
char old_path[GPATH_MAX], new_path[GPATH_MAX], buf[GPATH_MAX];
- struct stat info;
const char *files[] = { GV_FRMT_ELEMENT, GV_COOR_ELEMENT,
GV_HEAD_ELEMENT, GV_HIST_ELEMENT,
GV_TOPO_ELEMENT, GV_SIDX_ELEMENT, GV_CIDX_ELEMENT,
@@ -276,7 +275,7 @@
sprintf(buf, "%s/%s", out, files[i]);
G__file_name(new_path, GV_DIRECTORY, buf, G_mapset());
- if (stat(old_path, &info) == 0) { /* file exists? */
+ if (access(old_path, F_OK) == 0) { /* file exists? */
G_debug(2, "copy %s to %s", old_path, new_path);
if (copy_file(old_path, new_path)) {
G_warning(_("Unable to copy vector map <%s> to <%s>"),
More information about the grass-commit
mailing list