-
Notifications
You must be signed in to change notification settings - Fork 1.3k
os.listdir inconsistent #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm going to take a look at this. |
This is a little outside my comfort zone (which is great!) but I'm reading through the C code. My first intuition is that when the listdir function has to infer the directory, it's not recognizing it as the root directory in the way it would when you explicitly provide it with the root directory (via |
It turns out the reason for this has to do with what's mounted where, and how MicroPython was set up to handle mounted filesystems. On the pyboard, the internal flash is mounted as
On the pyboard,
The assumption that |
I don't know if this belongs here, but we also had a user report that if you create a directory called |
@deshipu, hmm, that's another bug. It should not let you use a mount point that's the same name as an existing file or dir. |
After an SD card is mounted,
os.listdir
returns different results depending on if the path name is given or implicit through the current working directory.Produces:
The text was updated successfully, but these errors were encountered: