Skip to content
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

module uos: Some file operations fail: #49

Closed
robert-hh opened this issue Apr 5, 2019 · 1 comment
Closed

module uos: Some file operations fail: #49

robert-hh opened this issue Apr 5, 2019 · 1 comment

Comments

@robert-hh
Copy link
Contributor

robert-hh commented Apr 5, 2019

This is about the /flash file system:
uos.getcwd(): returns "/flash/flash" instead "/flash"
uos.stat("./boot.py"):

>>> os.stat("./boot.py")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 2] ENOENT

Version:
MicroPython v0.2.4 on 2019-04-05; Sipeed_M1 with kendryte-k210
Type "help()" for more information.

@robert-hh
Copy link
Contributor Author

The error with os.getcwd() can be fixed by changing line 331 of file vsf_spiffs.c into:
return mp_obj_new_str("", 0);
The SD card behavior is not affected.
Fixing the other limitations in the chosen SPIFFS implementation may be wast of time. Using a better SPIFFS package is a better choice.

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

No branches or pull requests

1 participant