[GRASS-SVN] r60576 - grass/trunk/general/g.mlist

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 28 21:54:59 PDT 2014


Author: hcho
Date: 2014-05-28 21:54:59 -0700 (Wed, 28 May 2014)
New Revision: 60576

Modified:
   grass/trunk/general/g.mlist/main.c
Log:
g.mlist: -p/-f produce the same output as g.list

Modified: grass/trunk/general/g.mlist/main.c
===================================================================
--- grass/trunk/general/g.mlist/main.c	2014-05-29 04:23:58 UTC (rev 60575)
+++ grass/trunk/general/g.mlist/main.c	2014-05-29 04:54:59 UTC (rev 60576)
@@ -243,13 +243,13 @@
 
 	    G_debug(3, "lister CMD: %s", lister);
 
-	    if (access(lister, 1) == 0) {	/* execute permission? */
+	    if (access(lister, X_OK) == 0)	/* execute permission? */
 		G_spawn(lister, lister, mapset, NULL);
-		continue;
-	    }
+	    else
+		M_do_list(n, mapset);
 	}
 	else if (flag.pretty->answer)
-	    G_list_element(elem->element[0], elem->alias, mapset, NULL);
+	    M_do_list(n, mapset);
 	else
 	    make_list(fp, elem, mapset, separator, flag.type->answer,
 		      flag.mapset->answer, mapset && *mapset);



More information about the grass-commit mailing list