Problem: FileSize returns -1 (not existing) for an existing directory that is below a directory link.
Example: "C:\Program Files\" is a directory, and in German Windows versions there is a link to it called "C:\Programme\".
FileSize returns -2 for both of them (as it should).
However, it does not return -2 for subdirectories if they are accessed via the link, see the example:
Code: Select all
p1$ = "C:\Program Files\PureBasic"
p2$ = "C:\Programme\PureBasic"
Debug PathIsDirectory_(p1$) ; gives 16 (correct)
Debug FileSize(p1$) ; gives -2 (correct)
Debug PathIsDirectory_(p2$) ; gives 16 (correct)
Debug FileSize(p2$) ; gives -1 (FAIL... should be -2)
Workaroud: Use PathIsDirectory_ instead.
EDIT:
Updating Windows fixed this for me (see explanations below).

