Encrypted storage: shut down device if "Cancel" pressed

This commit is contained in:
Nicolas Mailloux 2021-10-27 21:55:58 -04:00
parent 1177143f7d
commit e0578ee28a

View file

@ -167,6 +167,11 @@ void encryptionManager::setupEncryptedStorage() {
} }
void encryptionManager::unlockEncryptedStorage() { void encryptionManager::unlockEncryptedStorage() {
if(global::encfs::cancelSetup == true) {
global::encfs::cancelSetup = false;
poweroff(true);
}
else {
this->setStyleSheet("background-color: white"); this->setStyleSheet("background-color: white");
ui->activityWidget->show(); ui->activityWidget->show();
mkEncfsDirs(); mkEncfsDirs();
@ -242,6 +247,7 @@ void encryptionManager::unlockEncryptedStorage() {
} ); } );
t->start(); t->start();
} }
}
void encryptionManager::mkEncfsDirs() { void encryptionManager::mkEncfsDirs() {
QDir encfsDir; QDir encfsDir;