|
@@ -75,21 +75,20 @@ int Vect_close(struct Map_info *Map)
|
|
|
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);
|