[fpc-pascal] ExtractRelativePath() not always returning expected result

Michael Van Canneyt michael at freepascal.org
Thu Aug 24 13:53:36 CEST 2017



On Thu, 24 Aug 2017, James Richters wrote:

> I’m trying to figure out ExtractRelativePath() and I’ve run the sample program found here:
>
> https://www.freepascal.org/docs-html/rtl/sysutils/extractrelativepath.html
>
>
>
> I get the following results from the sample (with a few test I threw in myself):
>
>> From "/pp/src/compiler" to "/pp/bin/win32/ppc386" via "..\bin\win32\ppc386"    // Shouldn’t this be “..\..\bin\win32\ppc386” ?

You must make sure directories are appended with /

Michael.


More information about the fpc-pascal mailing list