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

Joel Pitt joel.pitt at gmail.com
Thu Oct 26 05:50:02 EDT 2006


On 10/24/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.

Cheers

-- 
-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: 3433 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20061026/c1c7446c/gmapsetcreate.tar.gz


More information about the grass-dev mailing list