You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
fs_driver.py: fix "Back" issue on VfsFat due to trailing slash
This commit is contained in:
@@ -79,6 +79,7 @@ def _fs_dir_open_cb(drv, path):
|
||||
#print(f"_fs_dir_open_cb for path '{path}'")
|
||||
try:
|
||||
import os # for ilistdir()
|
||||
path = path.rstrip('/') # LittleFS handles trailing flashes fine, but vfs.VfsFat returns an [Errno 22] EINVAL
|
||||
return {'iterator' : os.ilistdir(path)}
|
||||
except Exception as e:
|
||||
print(f"_fs_dir_open_cb exception: {e}")
|
||||
|
||||
Reference in New Issue
Block a user