luafilesystem icon indicating copy to clipboard operation
luafilesystem copied to clipboard

cross-platform inconsistencies in `stat` function

Open cbeck88 opened this issue 8 years ago • 1 comments

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.)

cbeck88 avatar Oct 14 '15 01:10 cbeck88

#79

blasti avatar Aug 18 '16 18:08 blasti