diff --git a/src/main.cpp b/src/main.cpp index ba04a99..071662f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,7 +43,7 @@ constexpr unsigned long POWER_BUTTON_SLEEP_MS = 1000; Epub* loadEpub(const std::string& path) { if (!SD.exists(path.c_str())) { - Serial.println("File does not exist"); + Serial.printf("File does not exist: %s\n", path.c_str()); return nullptr; } diff --git a/src/screens/FileSelectionScreen.cpp b/src/screens/FileSelectionScreen.cpp index 1e5637a..bb73006 100644 --- a/src/screens/FileSelectionScreen.cpp +++ b/src/screens/FileSelectionScreen.cpp @@ -70,8 +70,8 @@ void FileSelectionScreen::handleInput() { return; } + if (basepath.back() != '/') basepath += "/"; if (files[selectorIndex].back() == '/') { - if (basepath.back() != '/') basepath += "/"; basepath += files[selectorIndex].substr(0, files[selectorIndex].length() - 1); loadFiles(); updateRequired = true;