Test if lastpath exists before adding it to path scan

This commit is contained in:
Phil Olynyk 2020-06-26 22:57:08 -04:00
parent 463836f696
commit cd40fc9a9e

View File

@ -914,7 +914,8 @@ QList<ImportPath> MainWindow::detectCPAPCards()
qDebug() << "Drive list size:" << AutoScannerPaths.size();
if ( (lastpath.size()>0) && ( ! AutoScannerPaths.contains(lastpath))) {
AutoScannerPaths.insert(0, lastpath);
if (QFile(lastpath).exists())
AutoScannerPaths.insert(0, lastpath);
}
Q_FOREACH(const QString &path, AutoScannerPaths) {