mirror of
https://github.com/opentx/opentx.git
synced 2025-07-27 02:05:16 +03:00
Companion will still find old TARANIS.BIN files
This commit is contained in:
parent
5aaa560cb4
commit
9135409e67
1 changed files with 25 additions and 5 deletions
|
@ -954,6 +954,7 @@ QString MainWindow::FindTaranisPath()
|
||||||
{
|
{
|
||||||
int pathcount=0;
|
int pathcount=0;
|
||||||
QString path;
|
QString path;
|
||||||
|
QString temppath;
|
||||||
QStringList drives;
|
QStringList drives;
|
||||||
QString eepromfile;
|
QString eepromfile;
|
||||||
QString fsname;
|
QString fsname;
|
||||||
|
@ -968,12 +969,21 @@ QString MainWindow::FindTaranisPath()
|
||||||
if(ret) {
|
if(ret) {
|
||||||
QString vName=QString::fromUtf16 ( (const ushort *) szVolumeName) ;
|
QString vName=QString::fromUtf16 ( (const ushort *) szVolumeName) ;
|
||||||
if (vName.contains("TARANIS")) {
|
if (vName.contains("TARANIS")) {
|
||||||
eepromfile=drive.absolutePath();
|
temppath=drive.absolutePath();
|
||||||
|
eepromfile=temppath;
|
||||||
eepromfile.append("/EEPROM.BIN");
|
eepromfile.append("/EEPROM.BIN");
|
||||||
if (QFile::exists(eepromfile)) {
|
if (QFile::exists(eepromfile)) {
|
||||||
pathcount++;
|
pathcount++;
|
||||||
path=eepromfile;
|
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) {
|
while (entry != NULL) {
|
||||||
if (!drives.contains(entry->me_devname)) {
|
if (!drives.contains(entry->me_devname)) {
|
||||||
drives.append(entry->me_devname);
|
drives.append(entry->me_devname);
|
||||||
eepromfile=entry->me_mountdir;
|
temppath=entry->me_mountdir;
|
||||||
|
eepromfile=temppath;
|
||||||
eepromfile.append("/EEPROM.BIN");
|
eepromfile.append("/EEPROM.BIN");
|
||||||
#if !defined __APPLE__ && !defined WIN32
|
#if !defined __APPLE__ && !defined WIN32
|
||||||
QString fstype=entry->me_type;
|
|
||||||
qDebug() << fstype;
|
|
||||||
if (QFile::exists(eepromfile) && fstype.contains("fat") ) {
|
if (QFile::exists(eepromfile) && fstype.contains("fat") ) {
|
||||||
#else
|
#else
|
||||||
if (QFile::exists(eepromfile)) {
|
if (QFile::exists(eepromfile)) {
|
||||||
|
@ -996,6 +1004,18 @@ QString MainWindow::FindTaranisPath()
|
||||||
pathcount++;
|
pathcount++;
|
||||||
path=eepromfile;
|
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; ;
|
entry = entry->me_next; ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue