[GRASS-dev] grass location creation
Paul Kelly
paul-grass at stjohnspoint.co.uk
Fri Mar 9 07:42:50 EST 2007
On Fri, 9 Mar 2007, Glynn Clements wrote:
>
> Jachym Cepicky wrote:
>
>> general/g.region/cmd/main.c:
>>
>> 851 if (flag.savedefault->answer)
>> 852 if (strcmp(G_mapset(),"PERMANENT") == 0)
>> 853 G__put_window( &window, "../PERMANENT", "DEFAULT_WIND" );
>> 854 else
>> 855 G_warning(_("You are not in mapset PERMANENT, default region -> remains untached"));
>>
>> is it sufficient?
>
> 853 G__put_window( &window, "", "DEFAULT_WIND" );
>
> If you're already in PERMANENT, there's no need for "../PERMANENT".
>
> Otherwise, fine.
Yes. My reason for the check was so users cannot overwrite the default
region by accident just if they happen to own the PERMANENT mapset,
without actually selecting it. Arguably it should be a fatal error rather
than a warning but it's fine.
Paul
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
More information about the grass-dev
mailing list