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

Joel Pitt joel.pitt at gmail.com
Thu Oct 26 18:43:26 EDT 2006


Sorry, have attached tar with correct file, make_mapset instead.

On 10/27/06, Glynn Clements <glynn at gclements.plus.com> wrote:
>
> 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>
>


-- 
-Joel

"Wish not to seem, but to be, the best."
                -- Aeschylus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmapsetcreate.tar.gz
Type: application/x-gzip
Size: 2470 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20061027/65152a7b/gmapsetcreate.tar.gz


More information about the grass-dev mailing list