From 5edf4c853272cc3f9d199403903e2286e7d93844 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Wed, 11 Jan 2023 19:03:54 +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, 3 insertions(+), 2 deletions(-) diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index 53b66741..4348d015 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -2459,8 +2459,9 @@ void MainWindow::closeEvent(QCloseEvent *e) } } - QDir dir = QDir(Dialog_ClrCache::getCachePath()); - if (dir.exists()) + QString cachePath = Dialog_ClrCache::getCachePath(); + QDir dir = QDir(cachePath); + if (dir.exists() && (cachePath.endsWith("Cache/") || cachePath.endsWith("Cache\\"))); dir.removeRecursively(); m_versionDll->PostUserCloseInfo(HGVERSION_APPNAME_SCANNER);