Skip to content

Fixed empty file list. Updated os import. #28

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

Merged
merged 3 commits into from
Aug 13, 2025

Conversation

ubidefeo
Copy link
Collaborator

@ubidefeo ubidefeo commented Aug 13, 2025

This PR addresses a bug caused by listing an empty folder.
In order not to leave global variables in the board's memory, we delete objects created during file creation/changes/listing.
If a folder was empty, the f variable would not exist and could not be deleted.

to reproduce the bug:

  • launch Lab for MicroPython
  • connect to a board
  • open Developer Tools
  • create an empty folder
  • the error would be visible in the console

During folder creation or navigation this was a non-issue, but trying to upload a file into that folder would hang the editor.

Another minor (but important) change was updating the import to replace uos with os

Signed-off-by: ubi de feo <me@ubidefeo.com>
@ubidefeo ubidefeo requested a review from sebromero August 13, 2025 06:49
@ubidefeo
Copy link
Collaborator Author

I have removed the version number commit because it should be updated on the version branch

Copy link

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ubidefeo ubidefeo merged commit 35fa1d0 into development Aug 13, 2025
1 check passed
@ubidefeo ubidefeo deleted the fix/empty-folder-list-error branch August 14, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants