[GRASS-dev] patch - allows g.mapset to create mapsets

Glynn Clements glynn at gclements.plus.com
Thu Oct 26 14:35:43 EDT 2006


Joel Pitt wrote:

> >     /* Make the mapset. */
> >     sprintf( path, "%s/%s/%s", gisdbase_name, location_name, mapset_name );
> >     if( mkdir( path, 0775 ) != 0 )
> >         return -1;
> >
> > The mkdir() call should use mode 0777; the user's umask setting will
> > affect the actual permissions.
> >
> > In general, directories should use 0777, files should use either 0777
> > (if they are executable) or 0666 (if they are not). The user can
> > always remove permissions through their umask setting, but can't add
> > permissions (other than manually running chmod).
> >
> >     /* Copy default window/regions to new mapset */
> >     G__put_window( &default_window, "", "DEFAULT_WIND" );
> >     G__put_window( &default_window, "", "WIND" );
> >
> > Normal mapsets don't have a DEFAULT_WIND file; only the PERMANENT
> > mapset has that. IOW, DEFAULT_WIND is a property of a location rather
> > than a mapset.
> 
> Updated with permissions 0777 and removed the call to add DEFAULT_WIND
> to the new mapset.

The attachment contains the wrong file: make_loc.c rather than
make_mapset.c.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list