mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 15:17: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) {
|
Epub* loadEpub(const std::string& path) {
|
||||||
if (!SD.exists(path.c_str())) {
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -70,8 +70,8 @@ void FileSelectionScreen::handleInput() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files[selectorIndex].back() == '/') {
|
|
||||||
if (basepath.back() != '/') basepath += "/";
|
if (basepath.back() != '/') basepath += "/";
|
||||||
|
if (files[selectorIndex].back() == '/') {
|
||||||
basepath += files[selectorIndex].substr(0, files[selectorIndex].length() - 1);
|
basepath += files[selectorIndex].substr(0, files[selectorIndex].length() - 1);
|
||||||
loadFiles();
|
loadFiles();
|
||||||
updateRequired = true;
|
updateRequired = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user