diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_QuectelRadio.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp index 8656973..601674b 100644 --- a/src/MTS_IO_QuectelRadio.cpp +++ b/src/MTS_IO_QuectelRadio.cpp @@ -968,9 +968,15 @@ ICellularRadio::CODE QuectelRadio::checkFile(bool& bIsFilePresent, const std::st return FAILURE; } - const std::string sExpected = "+QFLST: \"UFS:" + sTargetFilename + "\""; - bIsFilePresent = (sResult.find(sExpected) != std::string::npos); + // UFS files in +QFLST output may or may not have "UFS:" prefix + const std::string sExpectedFull = "+QFLST: \"UFS:" + sTargetFilename + "\""; + const std::string sExpectedAlt = "+QFLST: \"" + sTargetFilename + "\""; + // File is present if file name found with or without "UFS:" prefix in QFLST output + bool bIsPresentFull = (sResult.find(sExpectedFull) != std::string::npos); + bool bIsPresentAlt = (sResult.find(sExpectedAlt) != std::string::npos); + + bIsFilePresent = (bIsPresentFull || bIsPresentAlt); return SUCCESS; } |