[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Strange getcwd() return value
On Wednesday 16 October 2013 19:55:20 Vincent Rivière wrote:
> On 16/10/2013 19:29, Ole wrote:
> > I've also stumbled upon this bug in the function realpath() when
> > porting netsurf. AFAIK it only happens when running under classic
> > TOS, but not when running under FreeMiNT! Vincent R. confirmed the
> > bug. So, notice: It only happens under classic TOS.
>
> IMHO, that's a feature, not a bug.
> But a stupid feature.
>
> getcwd() is supposed to return a POSIX path, in other words, something
> with slashes and no drive letter. It seems that the original writers of
> the MiNTLib chose the /dev/<drive> prefix when running on TOS, which is
> a pure invention.
> On the other side, when running on FreeMiNT in the same directory,
> getcwd() returns just /<drive>.
As I wrote, this is under FreeMiNT and the real problem isn't the path
returned by getcwd(), it's that the current working directory of my
application isn't "/f/dir" as it should be but something else ("/dev/f/dir"
maybe?). That's what I'm trying to figure out. What is the current working dir
of my app. I'll see what GEMDOS has to offer.
Cheers,
JFL
--
Jean-François Lemaire