Reader framework: fix file opening bug

When an user first opened an ePUB, then a PDF, it didn't work. This was
due to an issue with the two tmpfs at '/kobo/inkbox' and '/kobo/run'.
This commit fixes that issue.
This commit is contained in:
Nicolas Mailloux 2022-03-06 19:48:32 -05:00
parent b2737d2f59
commit 8501b42124
2 changed files with 3 additions and 6 deletions

View file

@ -173,12 +173,7 @@ int main(int argc, char *argv[])
}
else {
if(checkconfig("/inkbox/bookIsEpub") == true) {
global::reader::bookIsEpub = true;
}
else {
global::reader::bookIsEpub = false;
}
QProcess::execute("remount_tmpfs_launch.sh", QStringList());
QApplication a(argc, argv);
MainWindow w;

View file

@ -1878,6 +1878,7 @@ void reader::getTotalEpubPagesNumber() {
string_checkconfig_ro("/run/epub_total_pages_number");
totalPagesInt = checkconfig_str_val.toInt();
QFile::remove("/run/epub_total_pages_number");
}
void reader::on_gotoBtn_clicked()
@ -2120,6 +2121,7 @@ void reader::getTotalPdfPagesNumber() {
string_checkconfig_ro("/run/pdf_total_pages_number");
totalPagesInt = checkconfig_str_val.toInt();
QFile::remove("/run/pdf_total_pages_number");
}
void reader::on_pdfScaleSlider_valueChanged(int value)