[GRASS-SVN] r71096 - grass/branches/releasebranch_7_2/vector/v.in.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 17 12:07:28 PDT 2017
Author: mmetz
Date: 2017-05-17 12:07:28 -0700 (Wed, 17 May 2017)
New Revision: 71096
Modified:
grass/branches/releasebranch_7_2/vector/v.in.ogr/dsn.c
grass/branches/releasebranch_7_2/vector/v.in.ogr/main.c
Log:
v.in.ogr: disable OGR dsn corruption
Modified: grass/branches/releasebranch_7_2/vector/v.in.ogr/dsn.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.in.ogr/dsn.c 2017-05-17 13:22:26 UTC (rev 71095)
+++ grass/branches/releasebranch_7_2/vector/v.in.ogr/dsn.c 2017-05-17 19:07:28 UTC (rev 71096)
@@ -7,7 +7,12 @@
char *get_datasource_name(const char *opt_dsn, int use_ogr)
{
char *dsn;
+
+ dsn = G_store(opt_dsn);
+
+ return dsn;
+ /* TODO: remove below code, or use it in e.g. a new v.in.pg */
if (G_strncasecmp(opt_dsn, "PG:", 3) == 0) {
/* PostgreSQL/PostGIS */
size_t i;
Modified: grass/branches/releasebranch_7_2/vector/v.in.ogr/main.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.in.ogr/main.c 2017-05-17 13:22:26 UTC (rev 71095)
+++ grass/branches/releasebranch_7_2/vector/v.in.ogr/main.c 2017-05-17 19:07:28 UTC (rev 71096)
@@ -363,9 +363,11 @@
datetime_type = "datetime";
dsn = NULL;
- if (param.dsn->answer)
- dsn = get_datasource_name(param.dsn->answer, TRUE);
-
+ if (param.dsn->answer) {
+ /* dsn = get_datasource_name(param.dsn->answer, TRUE); */
+ dsn = param.dsn->answer;
+ }
+
min_area = atof(param.min_area->answer);
snap = atof(param.snap->answer);
type = Vect_option_to_types(param.type);
More information about the grass-commit
mailing list