[fpc-pascal] Stupid ExcludeTrailingPathdelimiter question

Bart bartjunk64 at gmail.com
Sun May 12 11:33:38 CEST 2013


I did not expect this:

ExcludeTrailingPathDelimiter(/) =  {Linux}
ExcludeTrailingPathDelimiter(\) =  {Windows/WinCE}
ExcludeTrailingPathDelimiter(c:\) = c:

Reasom I'm asking: Lazarus ShellTreeView crashes if you set Root :=
'/' (on Linux, and presumably on WinCe as well with Root := '\').

When trying to check if AValue exists it calls
This allows sloppy programmers, or sloppy users to set Root to
/home/user/ as well as /home/user, but it fails in th eabove mentioned

My Delphi is very old and does not have the
ExcludeTrailingPathDelimiter function, so I cannot test how Delphi


More information about the fpc-pascal mailing list