Kaynağa Gözat

g.mapset: print only warning when mapset is already current

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48022 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 yıl önce
ebeveyn
işleme
6ba022c306
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 4 3
      general/g.mapset/main.c

+ 4 - 3
general/g.mapset/main.c

@@ -145,9 +145,10 @@ int main(int argc, char *argv[])
 	       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);