mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-16 22:27:42 +03:00
Fix bug with selectin epubs inside of folders
This commit is contained in:
parent
9a33030623
commit
6d3d25a288
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user