[GRASS-SVN] r55609 - grass/trunk/general/g.mapset
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 3 09:03:53 PDT 2013
Author: martinl
Date: 2013-04-03 09:03:53 -0700 (Wed, 03 Apr 2013)
New Revision: 55609
Modified:
grass/trunk/general/g.mapset/main.c
Log:
g.mapset: check return code of G_make_mapset()
Modified: grass/trunk/general/g.mapset/main.c
===================================================================
--- grass/trunk/general/g.mapset/main.c 2013-04-03 16:03:16 UTC (rev 55608)
+++ grass/trunk/general/g.mapset/main.c 2013-04-03 16:03:53 UTC (rev 55609)
@@ -162,7 +162,8 @@
if (flag.add->answer == TRUE) {
G_debug(2, "Mapset <%s> doesn't exist, attempting to create it",
mapset_new);
- G_make_mapset(gisdbase_new, location_new, mapset_new);
+ if (G_make_mapset(gisdbase_new, location_new, mapset_new) != 0)
+ G_fatal_error(_("Unable to create new mapset <%s>"), mapset_new);
}
else
G_fatal_error(_("Mapset <%s> does not exist. Use -c flag to create it."),
More information about the grass-commit
mailing list