Fix reading models from B&W radio
This commit is contained in:
@@ -907,7 +907,7 @@ void MainWindow::readSettings()
|
|||||||
{
|
{
|
||||||
Board::Type board = getCurrentBoard();
|
Board::Type board = getCurrentBoard();
|
||||||
QString tempFile;
|
QString tempFile;
|
||||||
if (IS_FAMILY_HORUS_OR_T16(board))
|
if (Boards::getCapability(board, Board::HasSDCard))
|
||||||
tempFile = generateProcessUniqueTempFileName("temp.etx");
|
tempFile = generateProcessUniqueTempFileName("temp.etx");
|
||||||
else
|
else
|
||||||
tempFile = generateProcessUniqueTempFileName("temp.bin");
|
tempFile = generateProcessUniqueTempFileName("temp.bin");
|
||||||
|
|||||||
@@ -60,9 +60,11 @@ bool SdcardFormat::writeFile(const QByteArray & data, const QString & filename)
|
|||||||
bool SdcardFormat::getFileList(std::list<std::string>& filelist)
|
bool SdcardFormat::getFileList(std::list<std::string>& filelist)
|
||||||
{
|
{
|
||||||
QDir dir(filename);
|
QDir dir(filename);
|
||||||
|
if (!dir.cd("MODELS")) return false;
|
||||||
|
|
||||||
QStringList ql = dir.entryList();
|
QStringList ql = dir.entryList();
|
||||||
for (const auto& str : ql) {
|
for (const auto& str : ql) {
|
||||||
filelist.push_back(str.toStdString());
|
filelist.push_back("MODELS/" + str.toStdString());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user