Review fixes

This commit is contained in:
jpirnay
2026-03-07 19:33:02 +01:00
parent a6f61fb0d0
commit 2abcf9bc68
3 changed files with 22 additions and 8 deletions
+4 -2
View File
@@ -160,14 +160,16 @@ void FileBrowserActivity::loop() {
const std::string& entry = files[selectorIndex];
const bool isDirectory = (entry.back() == '/');
if (basepath.back() != '/') basepath += "/";
if (isDirectory) {
if (basepath.back() != '/') basepath += "/";
basepath += entry.substr(0, entry.length() - 1);
loadFiles();
selectorIndex = 0;
requestUpdate();
} else {
onSelectBook(basepath + entry);
std::string fullPath = basepath;
if (fullPath.back() != '/') fullPath += "/";
onSelectBook(fullPath + entry);
}
return;
}