[GRASS-dev] No longer able to open a mapset by symbolic link

Joel Pitt joel.pitt at gmail.com
Tue Apr 3 00:41:04 EDT 2007


On 4/3/07, Glynn Clements <glynn at gclements.plus.com> wrote:
> > I'll submit a bug request, but wasn't sure whether this behaviour has
> > been discussed and decided as intended. I hope not, because I use it
> > to separate out simulation results (huge and stored on an external
> > server/HDD) and input data for the simulations (stored locally).
>
> AFAIK, having symlinks to mapset directories has never been
> intentionally supported; it just happened to work.

I've worked out a simple solution. In lib/gis/paths.c :

int G_lstat(const char *file_name, struct stat *buf)
{
#ifdef __MINGW32__
    return stat(file_name, buf);
#else
    return lstat(file_name, buf);
#endif
}

lstat(...) stats the link itself. Is there any reason why stat(...),
which follows a link instead, can't be used for both platforms?

-- 
-Joel

"Unless you try to do something beyond what you have mastered, you
will never grow." -C.R. Lawton




More information about the grass-dev mailing list