• Tom Sutcliffe's avatar
    Fix file.list() zero sizes. Fixes #3549. · e3883cd2
    Tom Sutcliffe authored
    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.
    e3883cd2
file.c 3.19 KB