[GRASS-SVN] r62904 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 25 00:16:22 PST 2014


Author: martinl
Date: 2014-11-25 00:16:22 -0800 (Tue, 25 Nov 2014)
New Revision: 62904

Modified:
   grass/trunk/lib/gis/progrm_nme.c
Log:
libgis: strip also .py extension from program name


Modified: grass/trunk/lib/gis/progrm_nme.c
===================================================================
--- grass/trunk/lib/gis/progrm_nme.c	2014-11-25 08:15:33 UTC (rev 62903)
+++ grass/trunk/lib/gis/progrm_nme.c	2014-11-25 08:16:22 UTC (rev 62904)
@@ -35,6 +35,8 @@
   Program name set to name (name will be returned by
   G_program_name*())
 
+  Extension like .exe or .py is stripped from program name.
+
   \param s program name
 */
 void G_set_program_name(const char *s)
@@ -53,6 +55,7 @@
     /* strip extension from program name */
     temp = G_store(s);
     G_basename(temp, "exe");
+    G_basename(temp, "py");
     name = G_store(temp);
 
     G_debug(1, "G_set_program_name(): %s", name);



More information about the grass-commit mailing list