Skip to content

Commit

Permalink
fix: [vault] Vault unlock failed but not show prompt box.
Browse files Browse the repository at this point in the history
When vault unlock failed, show prompt box.

Log: fix issue
Bug: https://pms.uniontech.com/bug-view-204381.html
  • Loading branch information
GongHeng2017 authored and deepin-bot[bot] committed Jul 13, 2023
1 parent 5f470ec commit e5e74ce
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "pathmanager.h"

#include <dfm-base/base/configs/dconfig/dconfigmanager.h>
#include <dfm-base/utils/dialogmanager.h>

#include <dfm-io/dfmio_utils.h>

Expand Down Expand Up @@ -125,8 +126,11 @@ void FileEncryptHandle::createVault(const QString &lockBaseDir, const QString &u
*/
bool FileEncryptHandle::unlockVault(const QString &lockBaseDir, const QString &unlockFileDir, const QString &DSecureString)
{
if (!createDirIfNotExist(unlockFileDir))
if (!createDirIfNotExist(unlockFileDir)) {
DialogManager::instance()->showErrorDialog(tr("Unlock failed"), tr("The %1 directory is occupied,\n please clear the files in this directory and try to unlock the safe again.").arg(unlockFileDir));
return false;
}


bool result { false };
d->mutex->lock();
Expand Down

0 comments on commit e5e74ce

Please sign in to comment.