mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
Check for existing lastpath file before Crostini warning
This commit is contained in:
parent
3ec5a4dd47
commit
a637bea0fe
@ -856,9 +856,6 @@ QStringList getDriveList()
|
||||
drivelist.append(dir.filePath() );
|
||||
}
|
||||
} else {
|
||||
QMessageBox::warning(nullptr, STR_MessageBox_Warning,
|
||||
QObject::tr("Chromebook file system detected, but no removable device found\n") +
|
||||
QObject::tr("You must share your SD card with Linux using the ChromeOS Files program"));
|
||||
drivelist.clear();
|
||||
drivelist.append("CROSTINI");
|
||||
}
|
||||
@ -917,8 +914,19 @@ QList<ImportPath> MainWindow::detectCPAPCards()
|
||||
do {
|
||||
// Rescan in case card inserted
|
||||
QStringList AutoScannerPaths = getDriveList();
|
||||
if (AutoScannerPaths.contains("CROSTINI")) // no Crostini removable drives found!
|
||||
break; // break out of the 20 second wait loop
|
||||
if (AutoScannerPaths.contains("CROSTINI")) { // no Crostini removable drives found!
|
||||
if (( lastpath.size() > 0) && ( ! AutoScannerPaths.contains(lastpath))) {
|
||||
if (QFile(lastpath).exists() ) {
|
||||
AutoScannerPaths.insert(0, lastpath);
|
||||
}
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(nullptr, STR_MessageBox_Warning,
|
||||
QObject::tr("Chromebook file system detected, but no removable device found\n") +
|
||||
QObject::tr("You must share your SD card with Linux using the ChromeOS Files program"));
|
||||
break; // break out of the 20 second wait loop
|
||||
}
|
||||
}
|
||||
// AutoScannerPaths.push_back(lastpath);
|
||||
qDebug() << "Drive list size:" << AutoScannerPaths.size();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user