On Tue, 29 Oct 2019, Bo Berglund via lazarus wrote:

On Tue, 29 Oct 2019 12:43:51 +0100 (CET), Michael Van Canneyt via
lazarus <[email protected]> wrote:

1. Don't hardcode '/' or '\', use the PathDelim constant instead.
   You will not need any ifdefs.

The whole thing is that paths might be read from config or other data
files and so they will come in either with / or \.
I cannot use PathDelim in the target spec because that would not find
the erroneous delimiters.

Hence the setdirseparators call. As soon as you read a path from a file,
correct it with SetDirSeparators. For the rest you use PathDelim and all
will be well.

You're not the only one to have to deal with this, we've all been there :-)

Michael.
--
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to