mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Skip . and .. on LittleFS::dir::rewind() (#6959)
Fixes #6958 To match SPIFFS, we get rid of the "." and ".." dirents when we open a directory on LittleFS. Do the same on a rewind().
This commit is contained in:
parent
5d5200af41
commit
2492043669
@ -567,6 +567,10 @@ public:
|
||||
bool rewind() override {
|
||||
_valid = false;
|
||||
int rc = lfs_dir_rewind(_fs->getFS(), _getDir());
|
||||
// Skip the . and .. entries
|
||||
lfs_info dirent;
|
||||
lfs_dir_read(_fs->getFS(), _getDir(), &dirent);
|
||||
lfs_dir_read(_fs->getFS(), _getDir(), &dirent);
|
||||
return (rc == 0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user