From 5c6aceb694323c1d966379ff9b4740ebb3441402 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Tue, 10 Jan 2023 12:03:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner/mainwindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index bf7661ff..19cc743c 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -2457,12 +2457,11 @@ void MainWindow::closeEvent(QCloseEvent *e) return; } } - } QDir dir = QDir(Dialog_ClrCache::getCachePath()); - dir.removeRecursively(); - QMainWindow::closeEvent(e); + if (dir.exists()) + dir.removeRecursively(); m_versionDll->PostUserCloseInfo(HGVERSION_APPNAME_SCANNER); }