[GRASS-dev] libgis: ERROR: Unable to make mapset element cell_misc/...

Markus Neteler neteler at osgeo.org
Sat Mar 7 03:08:44 EST 2009


On Sat, Mar 7, 2009 at 8:29 AM, Glynn Clements <glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> > access() sets errno when it fails.
>> >
>> > If you want the reason why mkdir() failed, you need to test the return
>> > value from G_mkdir(), e.g.:
...
>> Or is a second try to access unavoidable?
>
> It should be safe to remove the second access() call, but I would be
> inclined to leave it. Checking that the directory actually exists is
> more robust than assuming that it will from the fact that G_mkdir()
> succeeded.

Submitted with double error trapping.

Markus


More information about the grass-dev mailing list