[GRASS-SVN] r48022 - grass/trunk/general/g.mapset

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 1 07:11:44 EDT 2011


Author: martinl
Date: 2011-09-01 04:11:44 -0700 (Thu, 01 Sep 2011)
New Revision: 48022

Modified:
   grass/trunk/general/g.mapset/main.c
Log:
g.mapset: print only warning when mapset is already current


Modified: grass/trunk/general/g.mapset/main.c
===================================================================
--- grass/trunk/general/g.mapset/main.c	2011-09-01 10:16:54 UTC (rev 48021)
+++ grass/trunk/general/g.mapset/main.c	2011-09-01 11:11:44 UTC (rev 48022)
@@ -145,9 +145,10 @@
 	       mapset_new);
 
     /* TODO: this should be checked better (repeated '/' etc.) */
-    if (strcmp(mapset_old_path, mapset_new_path) == 0)
-	G_fatal_error(_("<%s> is already the current mapset"), mapset_new);
-
+    if (strcmp(mapset_old_path, mapset_new_path) == 0) {
+	G_warning(_("<%s> is already the current mapset"), mapset_new);
+	exit(EXIT_SUCCESS);
+    }
     /* Check if the mapset exists and user is owner */
     G_debug(2, "check : %s", mapset_new_path);
 



More information about the grass-commit mailing list