LITTLEFS icon indicating copy to clipboard operation
LITTLEFS copied to clipboard

LITTLEFSimpl::exists() bug with Platformio (ESP32 arduino framework) in Visual Studio Code

Open har-in-air opened this issue 4 years ago • 11 comments

Compiling .pio/build/esp32dev/lib63a/LittleFS_esp32/LITTLEFS.cpp.o
.pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp: In member function 'virtual bool LITTLEFSImpl::exists(const char*)':
.pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp:44:28: error: no matching function for call to 'LITTLEFSImpl::open(const char*&, const char [2])'
     File f = open(path, "r");
In file included from .pio/libdeps/esp32dev/LittleFS_esp32/src/LITTLEFS.cpp:17:
/home/hari/.platformio/packages/framework-arduinoespressif32/libraries/FS/src/vfs_api.h:38:17: note: candidate: 'virtual fs::FileImplPtr VFSImpl::open(const char*, const char*, bool)'
     FileImplPtr open(const char* path, const char* mode, const bool create) override;
                 ^~~~
/home/hari/.platformio/packages/framework-arduinoespressif32/libraries/FS/src/vfs_api.h:38:17: note:   candidate expects 3 arguments, 2 provided
*** [.pio/build/esp32dev/lib63a/LittleFS_esp32/LITTLEFS.cpp.o] Error 1

Fixed by adding third argument File f = open(path, "r", false);

har-in-air avatar Oct 15 '21 09:10 har-in-air

@tonyrewin - thanks for your bugfix. When will this gets released?

goblingift avatar May 27 '22 14:05 goblingift

Screw it. I am going to submit a fix today if possible.

Michael2MacDonald avatar Sep 28 '22 15:09 Michael2MacDonald

For some reason, I can't get the PR I created to show up here. If someone could help teach me how to do that or why it is not working then that would be great.

But my PR can be found here: https://github.com/lorol/LITTLEFS/pull/56

Please review and merge my PR so this tiny issue can finally be over!

EDIT: I got trigger happy and just realized that PR https://github.com/lorol/LITTLEFS/pull/49 exists! Please merge one of these, or make the fix manually, and then close all the PRs and this issue!

Michael2MacDonald avatar Sep 28 '22 16:09 Michael2MacDonald

Im still running into this using platformio. Am I installing the wrong version?

waymond91 avatar Nov 12 '22 08:11 waymond91