[GRASS-SVN] r66779 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 11 07:15:19 PST 2015
Author: martinl
Date: 2015-11-11 07:15:19 -0800 (Wed, 11 Nov 2015)
New Revision: 66779
Modified:
grass/trunk/lib/vector/Vlib/open.c
Log:
vlib: fix GRASS_VECTOR_TMPDIR_MAPSET when opening existing map
Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c 2015-11-11 14:36:09 UTC (rev 66778)
+++ grass/trunk/lib/vector/Vlib/open.c 2015-11-11 15:15:19 UTC (rev 66779)
@@ -255,8 +255,18 @@
}
Vect__get_element_path(file_path, Map, GV_HEAD_ELEMENT);
- if (access(file_path, F_OK) != 0)
- return -1;
+ if (access(file_path, F_OK) != 0) {
+ /* unable to find header file for temporary map, try
+ * to switch to normal mode, useful when updating
+ * existing map */
+ Map->temporary = FALSE;
+ Vect__get_path(path, Map); /* path must be updated for
+ * subsequent operations */
+ Vect__get_element_path(file_path, Map, GV_HEAD_ELEMENT);
+ if (access(file_path, F_OK) != 0)
+ return -1;
+
+ }
}
}
More information about the grass-commit
mailing list