Companion will still find old TARANIS.BIN files
This commit is contained in:
@@ -954,6 +954,7 @@ QString MainWindow::FindTaranisPath()
|
||||
{
|
||||
int pathcount=0;
|
||||
QString path;
|
||||
QString temppath;
|
||||
QStringList drives;
|
||||
QString eepromfile;
|
||||
QString fsname;
|
||||
@@ -968,12 +969,21 @@ QString MainWindow::FindTaranisPath()
|
||||
if(ret) {
|
||||
QString vName=QString::fromUtf16 ( (const ushort *) szVolumeName) ;
|
||||
if (vName.contains("TARANIS")) {
|
||||
eepromfile=drive.absolutePath();
|
||||
temppath=drive.absolutePath();
|
||||
eepromfile=temppath;
|
||||
eepromfile.append("/EEPROM.BIN");
|
||||
if (QFile::exists(eepromfile)) {
|
||||
pathcount++;
|
||||
path=eepromfile;
|
||||
}
|
||||
else {
|
||||
eepromfile=temppath;
|
||||
eepromfile.append("/TARANIS.BIN");
|
||||
if (QFile::exists(eepromfile)) {
|
||||
pathcount++;
|
||||
path=eepromfile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -983,12 +993,10 @@ QString MainWindow::FindTaranisPath()
|
||||
while (entry != NULL) {
|
||||
if (!drives.contains(entry->me_devname)) {
|
||||
drives.append(entry->me_devname);
|
||||
eepromfile=entry->me_mountdir;
|
||||
|
||||
temppath=entry->me_mountdir;
|
||||
eepromfile=temppath;
|
||||
eepromfile.append("/EEPROM.BIN");
|
||||
#if !defined __APPLE__ && !defined WIN32
|
||||
QString fstype=entry->me_type;
|
||||
qDebug() << fstype;
|
||||
if (QFile::exists(eepromfile) && fstype.contains("fat") ) {
|
||||
#else
|
||||
if (QFile::exists(eepromfile)) {
|
||||
@@ -996,6 +1004,18 @@ QString MainWindow::FindTaranisPath()
|
||||
pathcount++;
|
||||
path=eepromfile;
|
||||
}
|
||||
else {
|
||||
eepromfile=temppath;
|
||||
eepromfile.append("/TARANIS.BIN");
|
||||
#if !defined __APPLE__ && !defined WIN32
|
||||
if (QFile::exists(eepromfile) && fstype.contains("fat") ) {
|
||||
#else
|
||||
if (QFile::exists(eepromfile)) {
|
||||
#endif
|
||||
pathcount++;
|
||||
path=eepromfile;
|
||||
}
|
||||
}
|
||||
}
|
||||
entry = entry->me_next; ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user