[GRASS5] [bug #1797] (grass) g.gisenv
Harmisch Bowman via RT
grass-bugs at intevation.de
Thu Apr 17 00:18:21 EDT 2003
sorry about that last empty message, pressed enter in the wrong place.
With respect to being able to set a new mapset after the old has been set
incorrectly with g.gisenv, this seems to work fine, thanks. Can you forsee any
unwanted repercussions?
--- grass/src/general/g.gisenv/main.c Sat Apr 12 18:24:38 2003
+++ grass/src/general/g.gisenv/main.c.NEW Thu Apr 17 15:43:02 2003
@@ -12,7 +12,8 @@
struct Option *get, *set;
struct GModule *module;
- G_gisinit (argv[0]);
+ G_set_program_name(argv[0]);
+ G_no_gisinit();
module = G_define_module();
module->description =
I'm still looking for a (gis lib) way of testing to see if a mapset/whatever
exists without the library function generating a fatal error. ?
(for test before G_setenv)
> > Subject: g.gisenv
> >
> > g.gisenv lets you set a variable to nonexistant values without a check,
> > and the only way to go on is to exit GRASS and delete/edit the .grassrc5
> > file.
> >
> > any ideas?
>
> g.gisenv calls G_gisinit(), which generates a fatal error if the
> mapset directory doesn't exist or has incorrect permissions (i.e.
> ownership).
>
> Using:
>
> G_set_program_name(argv[0]);
> G_no_gisinit();
>
> should work.
-------------------------------------------- Managed by Request Tracker
More information about the grass-dev
mailing list