Fix file.list() zero sizes. Fixes #3549.
The modern spiffs backend doesn't like stat("./somefile") for something on the root of the filesystem, and instead only accepts "somefile" (it also doesn't like "/somefile"). The error from stat was being ignored which is why the file sizes all appeared to be zero. The fix is to change file.list() to pass just the filename, unless a directory was passed to list(). Also improved error handling a bit.
Please register or sign in to comment