[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Strange getcwd() return value



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>. It would make sense if getcwd() could return the same thing with both TOS and FreeMiNT.

And frankly, the MiNTLib should provide a setting to make getcwd() return TOS-like directories such as C:\. Maybe that already exists.

--
Vincent Rivière