wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
398 stars 85 forks source link

Proposed fix for issue #19 #20

Closed PMunch closed 7 years ago

PMunch commented 7 years ago

This fixes issue #19 by using the os.stat st_mode flag to determine if a file is a folder or not instead of relying on string handling of an exception message. This makes the code much more robust (just imagine if there was a file or folder named ENOENT involved in a completely unrelated error message) and solves the issue for all boards not requiring a special case for WiPy/LoPy. Will try to go over the rest of this code and do similar fixes tomorrow.