diff --git a/rshell/main.py b/rshell/main.py index d6b13f9..0fad6e7 100755 --- a/rshell/main.py +++ b/rshell/main.py @@ -746,6 +746,11 @@ def lstat(filename): rstat = os.lstat(filename) except: rstat = os.stat(filename) + if rstat[0] & 0x4000 != 0 and rstat[8] == 0: + # littlefs does some funky stuff with the size field and directories. + # For now, we just set the size to 0. + # unreasonable. + rstat = rstat[:6] + tuple([0]) + rstat[7:] return rstat[:7] + tuple(tim + TIME_OFFSET for tim in rstat[7:]) diff --git a/rshell/version.py b/rshell/version.py index 138343c..26d1aa3 100644 --- a/rshell/version.py +++ b/rshell/version.py @@ -1 +1 @@ -__version__ = '0.0.31' +__version__ = '0.0.32'