Skip to content

Commit dc67023

Browse files
committed
fix(LittleFS): Use VFSImpl::exists() to avoid false error log
Use exists() from VFSImpl base class and avoid using open() to check whether the file exists, because open() will log an error which is confusing, but might be relevant in case a developer uses open() and expects that the file is there. #7615
1 parent 4098c53 commit dc67023

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

libraries/LittleFS/src/LittleFS.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,10 @@ class LittleFSImpl : public VFSImpl {
3333
public:
3434
LittleFSImpl();
3535
virtual ~LittleFSImpl() {}
36-
virtual bool exists(const char *path);
3736
};
3837

3938
LittleFSImpl::LittleFSImpl() {}
4039

41-
bool LittleFSImpl::exists(const char *path) {
42-
File f = open(path, "r", false);
43-
return (f == true);
44-
}
45-
4640
LittleFSFS::LittleFSFS() : FS(FSImplPtr(new LittleFSImpl())), partitionLabel_(NULL) {}
4741

4842
LittleFSFS::~LittleFSFS() {

0 commit comments

Comments
 (0)