encryptionmanager.cpp: Nonsensical fixes

This commit is contained in:
Nicolas Mailloux 2023-05-21 02:53:29 +00:00
parent 08fc6ea967
commit c733dd23ab

View file

@ -236,8 +236,10 @@ void encryptionManager::unlockEncryptedStorage() {
t->setInterval(1000); t->setInterval(1000);
connect(t, &QTimer::timeout, [&]() { connect(t, &QTimer::timeout, [&]() {
if(QFile::exists("/external_root/run/encfs_mounted")) { if(QFile::exists("/external_root/run/encfs_mounted")) {
exitStatus = checkconfig("/external_root/run/encfs_mounted"); exitStatus = true;
if(exitStatus == false) { if(readFile("/external_root/run/encfs_mounted") != "true\n") {
exitStatus = false;
QFile::remove("/external_root/run/encfs_mounted");
QString function = __func__; log(function + ": Invalid passphrase", className); QString function = __func__; log(function + ": Invalid passphrase", className);
if(setupMessageBoxRan == false) { if(setupMessageBoxRan == false) {
int delay = 0; int delay = 0;
@ -331,7 +333,6 @@ void encryptionManager::setupFailedAuthenticationMessageBox() {
log("Showing 'Authentication failed' message box", className); log("Showing 'Authentication failed' message box", className);
ui->activityWidget->hide(); ui->activityWidget->hide();
QMessageBox::critical(this, tr("Invalid argument"), tr("<font face='u001'>Invalid passphrase. Please try again.</font>")); QMessageBox::critical(this, tr("Invalid argument"), tr("<font face='u001'>Invalid passphrase. Please try again.</font>"));
QFile::remove("/external_root/run/encfs_mounted");
quit_restart(); quit_restart();
} }