[GRASS-SVN] r63600 - grass/trunk/vector/v.out.ascii

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 18 13:10:03 PST 2014


Author: mmetz
Date: 2014-12-18 13:10:03 -0800 (Thu, 18 Dec 2014)
New Revision: 63600

Modified:
   grass/trunk/vector/v.out.ascii/main.c
Log:
v.out.ascii: fix return code interpretation

Modified: grass/trunk/vector/v.out.ascii/main.c
===================================================================
--- grass/trunk/vector/v.out.ascii/main.c	2014-12-18 21:08:49 UTC (rev 63599)
+++ grass/trunk/vector/v.out.ascii/main.c	2014-12-18 21:10:03 UTC (rev 63600)
@@ -151,7 +151,7 @@
 			   region, type, field, clist, (const char *)where,
 			   (const char **)columns, header);
 
-    if (ret < 1) {
+    if (ret == 0) {
 	if (format == GV_ASCII_FORMAT_POINT) {
 	    G_warning(_("No points found, nothing to be exported"));
 	}
@@ -159,6 +159,9 @@
 	    G_warning(_("No features found, nothing to be exported"));
 	}
     }
+    else if (ret < 0) {
+	G_warning(_("An error occured, nothing to be exported"));
+    }
     
     if (ascii != NULL)
 	fclose(ascii);



More information about the grass-commit mailing list