[GRASS-SVN] r55681 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 10 05:41:27 PDT 2013
Author: mmetz
Date: 2013-04-10 05:41:27 -0700 (Wed, 10 Apr 2013)
New Revision: 55681
Modified:
grass/trunk/lib/vector/Vlib/map.c
Log:
Vlib: fix r55401, windows can not delete files that are open, we have fixed that problem here before
Modified: grass/trunk/lib/vector/Vlib/map.c
===================================================================
--- grass/trunk/lib/vector/Vlib/map.c 2013-04-10 12:14:59 UTC (rev 55680)
+++ grass/trunk/lib/vector/Vlib/map.c 2013-04-10 12:41:27 UTC (rev 55681)
@@ -475,6 +475,7 @@
/* Delete all files from vector/name directory */
path = Vect__get_element_path(&Map, NULL);
+ Vect_close(&Map);
G_debug(3, "opendir '%s'", path);
dir = opendir(path);
if (dir == NULL) {
@@ -498,11 +499,9 @@
}
}
closedir(dir);
- G_free(path);
/* NFS can create .nfsxxxxxxxx files for those deleted
* -> we have to move the directory to ./tmp before it is deleted */
- path = Vect__get_element_path(&Map, NULL);
tmp = G_tempfile();
G_debug(3, "rename '%s' to '%s'", path, tmp);
@@ -511,6 +510,7 @@
G_warning(_("Unable to rename directory '%s' to '%s'"), path, tmp);
return -1;
}
+ G_free(path);
G_debug(3, "remove directory '%s'", tmp);
/* Warning: remove() fails on Windows */
More information about the grass-commit
mailing list