Fix simulated SD card path redirection
This commit is contained in:
@@ -124,23 +124,20 @@ bool redirectToSettingsDirectory(const std::string & path)
|
|||||||
* model (*.bin) files in /MODELS directory
|
* model (*.bin) files in /MODELS directory
|
||||||
*/
|
*/
|
||||||
if (!simuSettingsDirectory.empty()) {
|
if (!simuSettingsDirectory.empty()) {
|
||||||
#if defined(COLORLCD)
|
#if defined(SDCARD_RAW) || defined(SDCARD_YAML)
|
||||||
if (path == RADIO_MODELSLIST_PATH || path == RADIO_SETTINGS_PATH
|
if (path == MODELS_PATH || path == RADIO_PATH) return true;
|
||||||
#if defined(SDCARD_YAML)
|
#if !defined(EEPROM_RLC)
|
||||||
|| path == MODELSLIST_YAML_PATH || path == RADIO_SETTINGS_YAML_PATH
|
if (path == RADIO_MODELSLIST_PATH || path == RADIO_SETTINGS_PATH)
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
if (startsWith(path, MODELS_PATH) && endsWith(path, MODELS_EXT))
|
||||||
#endif
|
|
||||||
if (startsWith(path, "/MODELS")
|
|
||||||
&& (endsWith(path, MODELS_EXT)
|
|
||||||
#if defined(SDCARD_YAML)
|
|
||||||
|| endsWith(path, YAML_EXT)
|
|
||||||
#endif
|
|
||||||
)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined(SDCARD_YAML)
|
||||||
|
if (path == MODELSLIST_YAML_PATH || path == RADIO_SETTINGS_YAML_PATH)
|
||||||
|
return true;
|
||||||
|
if (startsWith(path, MODELS_PATH) && endsWith(path, YAML_EXT)) return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user