On 8/20/12, Tomas Hajny <xhaj...@hajny.biz> wrote: > If that is the original problem, you could use the following check: > > if ExpandFileName (APath+'..'+DirectorySeparator) <> ExpandFileName > (APath) then ... [snip] > implementation). DirectoryExists for 'c:\..\' returns true under Win32 for > the same reason.
The supplied path in this scenario (Delphi converter) already is processed for any .. in it by TrimFileName() (FileProcs unit from Lazarus CodeTools). And yes, it will not detect a substituted drive or a network drive, but in the context of the original problem, this is not really a problem. [quote] Your program is in directory C:\Bug4, right? Could you try moving it one level down in directory hierarchy, for example to C:\SW\Bug4 or whatever. The converter scans in a background thread all directories under the converted project's parent directory, searching for pascal source files. Many projects have library sources organized that way. Obviously it creates a problem if your project is just under C:\ root. [/quote] For this the current solution will do for now. Both Juha and me were just wondering if any such function already existed. Given your comments, I can see it's unlikely we will have such a general function, given all the possible exceptions mentioned above. Thanks everybody for your input. Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal