[GRASS-SVN] r70501 - grass/trunk/vector/v.out.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 8 01:15:37 PST 2017


Author: martinl
Date: 2017-02-08 01:15:37 -0800 (Wed, 08 Feb 2017)
New Revision: 70501

Modified:
   grass/trunk/vector/v.out.ogr/args.c
   grass/trunk/vector/v.out.ogr/main.c
Log:
v.out.ogr: fatal_error -> option rule


Modified: grass/trunk/vector/v.out.ogr/args.c
===================================================================
--- grass/trunk/vector/v.out.ogr/args.c	2017-02-08 09:05:21 UTC (rev 70500)
+++ grass/trunk/vector/v.out.ogr/args.c	2017-02-08 09:15:37 UTC (rev 70501)
@@ -126,6 +126,8 @@
 	_("Create a new empty layer in defined OGR datasource "
 	  "and exit. Nothing is read from input.");
     flags->new->guisection = _("Creation");
+
+    G_option_requires(flags->append, options->layer, NULL);
     
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);

Modified: grass/trunk/vector/v.out.ogr/main.c
===================================================================
--- grass/trunk/vector/v.out.ogr/main.c	2017-02-08 09:05:21 UTC (rev 70500)
+++ grass/trunk/vector/v.out.ogr/main.c	2017-02-08 09:15:37 UTC (rev 70501)
@@ -193,10 +193,6 @@
     if (!options.layer->answer) {
 	char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
-	if (flags.append->answer)
-	    G_fatal_error(_("Appending to OGR layer requires option '%s'"),
-	                  options.layer->key);
-
 	if (G_name_is_fully_qualified(options.input->answer, xname, xmapset))
 	    options.layer->answer = G_store(xname);
 	else



More information about the grass-commit mailing list