[Lazarus] FileExistsUTF8 and long paths
Bart
bartjunk64 at gmail.com
Tue Jan 19 23:08:14 CET 2016
On 1/19/16, Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:
> > If I understood you correctly you would want to have
> > function FileXXXUtf8(Fn) do:
> > begin
> > if (Length(Fn) > MaxPath) and (not StartsWith('\\?\',Fn) then
> > FileXXXUtf8('\\?\' + Fn)
> > else
> > OriginalImplementationOfFileXXXUtf8()
> > end;
> > (With the exception of ExpandFilenameUtf8)
>
> Yes, more or less.
> Slashes should be converted to backslashes too.
>
> Also, expanding (relative or incomplete) paths can be done
> by Lazarus internally so that this would even work with long paths.
Again you fail to see the problem.
There is no way of telling wether e.g.
C:\longpath\..\..\..\..\longpath/foo/bar is meant as a extended long
path or not.
Only the programmer of that particular program may know.
If we guess wrong, the program will do something it is not supposed to do.
But now I'm only repeating arguments, so I'll stop contributing to this thread.
Bart
More information about the Lazarus
mailing list