[fpc-pascal] GetCurrentDir

Henry Vermaak henry.vermaak at gmail.com
Mon Apr 22 10:36:18 CEST 2013


On Mon, Apr 22, 2013 at 09:57:06AM +0200, Michael Van Canneyt wrote:
> On Mon, 22 Apr 2013, Marco van de Voort wrote:
> >In our previous episode, Mattias Gaertner said:
> >>>The FPC code tries to work its way up from '.' in such a case.
> >>>
> >>>I just tried, but it gives a correct result in my case.
> >>
> >>Maybe as fallback it can use the environment variable PWD?
> >
> >No. That would only be valid right after startup, and doesn't change
> >when you chdir in the program.
> 
> +1

I think that readlink on /proc/self/cwd should work?

Henry



More information about the fpc-pascal mailing list