[fpc-pascal] ExtractRelativePath() not always returning expected result
James Richters
james at productionautomation.net
Thu Aug 24 14:14:29 CEST 2017
>You must make sure directories are appended with /
Thank you, I just tried that and now I get the expected results: both / and \ work
>From "/pp/src/compiler/" to "/pp/bin/win32/ppc386/" via "..\..\bin\win32\ppc386\"
>From "/pp/bin/win32/ppc386/" to "/pp/src/compiler/" via "..\..\..\src\compiler\"
>From "e:/pp/bin/win32/ppc386/" to "d:/pp/src/compiler/" via "d:/pp/src/compiler/"
>From "e:\pp\bin\win32\ppc386/" to "d:\pp\src\compiler/" via "d:\pp\src\compiler/"
>From "C:\FPC\3.0.2\" to "C:\FPC\3.0.2\" via ""
>From "C:\FPC\3.0.2\" to "C:\FPC\3.0.4rc1\" via "..\3.0.4rc1\"
>From "Q:\" to "Q:\FPC\3.0.4rc1\" via "FPC\3.0.4rc1\"
I guess the example program should have the trailing / in the examples to make it clear they are needed. None of the sample test cases have trailing / or \
I am curious about this though:
>From "/pp/src/compiler/" to "/pp/bin/win32/ppc386/" via "..\..\bin\win32\ppc386\"
Shouldn't the output use / since / was used in both the source and destination not \ ?
James
More information about the fpc-pascal
mailing list