luafilesystem
luafilesystem copied to clipboard
cross-platform inconsistencies in `stat` function
In tinkering with this, I've found that paths like /home
, /home/
/home/chris
and /home/chris/
are valid when this is compiled on linux, but on mingw the situation is different.
C:
is not valid, but C:\ is valid
. But, C:\Program Files
is valid, while C:\Program Files\
is not valid, and stat returns that it is not a directory.
IMO the stat function should be modified so that it consumes any trailing path separators, then puts one back if the result is then 2 characters and the 2nd is ':'. (First part of this is more important than the second.)
#79