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

Fixed LITTLEFSimpl::exists() error: Fix lorol/LITTLEFS#43 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Michael2MacDonald
Copy link

LitteFS fails to compile, resulting in this error:

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 a third argument to the call to the open function as shown below.

File f = open(path, "r");        // Current
File f = open(path, "r", false); // My Fix

This function call is located on line 44 of src/LITTLEFS.cpp:

bool LITTLEFSImpl::exists(const char* path)
{
    File f = open(path, "r", false);
    return (f == true);
}

@Michael2MacDonald Michael2MacDonald changed the title Fixed LITTLEFSimpl::exists() error: Closes #10 Fixed LITTLEFSimpl::exists() error: Closes #43 Sep 28, 2022
@Michael2MacDonald Michael2MacDonald changed the title Fixed LITTLEFSimpl::exists() error: Closes #43 Fixed LITTLEFSimpl::exists() error: Closes lorol/LITTLEFS#43 Sep 28, 2022
@Michael2MacDonald Michael2MacDonald changed the title Fixed LITTLEFSimpl::exists() error: Closes lorol/LITTLEFS#43 Fixed LITTLEFSimpl::exists() error: Fix lorol/LITTLEFS#43 Sep 28, 2022
hakuamesan added a commit to hakuamesan/LITTLEFS that referenced this pull request Jul 24, 2023
Fixed LITTLEFSimpl::exists() error: Fix lorol#43 lorol#56
@pauldotknopf
Copy link

What's the hold up here?

@Michael2MacDonald
Copy link
Author

It looks like this was approved but no further action was taken to merge. It should be pretty simple to merge unless there is something blocking it. Can we get an update?

@palmarci
Copy link

palmarci commented Jul 7, 2024

This is still a problem

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.

4 participants