Re #4224: Enable reading and writing Models and Settings from/to Horu… (#4254)

* Re #4224: Enable reading and writing Models and Settings from/to Horus radio (SD card)

* Fix for findMassstoragePath() on Windows (which got there in previous commit)
This commit is contained in:
Damjan Adamic
2017-01-19 21:26:18 +01:00
committed by Bertrand Songis
parent 3c62cbf200
commit e59a51e25f
5 changed files with 46 additions and 15 deletions
+3 -3
View File
@@ -400,7 +400,7 @@ bool isRemovableMedia(const QString & vol)
}
#endif
QString findMassstoragePath(const QString &filename)
QString findMassstoragePath(const QString &filename, bool onlyPath)
{
QString temppath;
QStringList drives;
@@ -426,7 +426,7 @@ QString findMassstoragePath(const QString &filename)
eepromfile = temppath;
eepromfile.append("/" + filename);
if (QFile::exists(eepromfile)) {
return eepromfile;
return onlyPath ? temppath : eepromfile;
}
}
}
@@ -452,7 +452,7 @@ QString findMassstoragePath(const QString &filename)
if (QFile::exists(eepromfile)) {
#endif
free_file_system_list(firstEntry);
return eepromfile;
return onlyPath ? temppath : eepromfile;
}
}
entry = entry->me_next;