@Hansaplast
Actually it is the other way around: A
directory is
always a
file under Unix and derivatives. "Everything is a file" adagium.
What happens here is that recently, to avoid platform confusion, directories are filtered out from FileExists calls and DirectoryExists should be used instead for directories, it filters the other way around
.
Technically, the new behavior is not Unix compliant in any way, but it helps the cross-platform nature of FPC and Lazarus.
I believe that 3.0.4 still has the old behavior and that the new behavior is back-ported to 3.2.0 (or maybe 3.2.1)
Note that I actually quite like this new behavior since I have lots of code that should compile on both Windows and Linux with the same consistent behavior.
(note to self: I have to check if devices are also filtered, because these are also files and maybe should not be shown.)