[lazarus] Wrong note in windows: Lazarus source directory notset
Vincent Snijders
vslist at zonnet.nl
Sat Dec 20 06:13:50 EST 2003
On Sat, 20 Dec 2003 12:00:20 +0100
Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> On Fri, 19 Dec 2003 22:51:45 +0100 Vincent Snijders
> <vslist at zonnet.nl> wrote:
>
> > Hi,
> >
> > Lazarus gives a wrong note: Lazarus source directory not set, even
> > if it is set correctly. The reason is a difference in behaviour of
> > the FileExists function.
> >
> > Lazarus appends the directory seperator ('/' or '\' depending on the
> > platform) to path given by the user. Under linux FileExists returns
> > true for /my/lazarus/source/dir and /my/lazarus/source/dir/. Under
> > windows c:\my\lazarus\source\dir returns true, but
> > c:\my\lazarus\source\dir\ returns false.
> >
> > IMO the most simple solution to solve this wrong not, would be
> > storing the dir without the appended directory seperator, but I am
> > not sure about the impact this would have for the rest of lazarus.
>
> Probably none. The IDE trims and adds path delimiters as it needs. So,
> deleting the path delimiter will neither break, nor fix it completely.
>
>
> > There might be simplier solutions.
>
> I think, the only solution is to check all fileexists if they should
> be replaced by DirectoryExists. But there are a lot of places...
I 'll start replacing FileExists with DirectoryExists, since
DirectoryExists doesn't get upset from a append directory separator.
Vincent.
More information about the Lazarus
mailing list