From 8b7602e223db6e3a910a645fb50c4be0c3b2978b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Dec 2015 17:39:04 +0200 Subject: [PATCH] In restore list clear all files that do not exist. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index f69905d94..05950ad57 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3579,7 +3579,17 @@ QStringList MainWindow::GetUnlokedRestoreFileList() const files.removeAll(restoreFiles.at(i)); } - qApp->ValentinaSettings()->SetRestoreFileList(files); + // Clear all files that do not exist. + QStringList filtered; + for (int i = 0; i < files.size(); ++i) + { + if (QFileInfo(files.at(i)).exists()) + { + filtered.append(files.at(i)); + } + } + + qApp->ValentinaSettings()->SetRestoreFileList(filtered); } return restoreFiles; #else