diff --git a/Tactility/Source/service/gps/GpsConfiguration.cpp b/Tactility/Source/service/gps/GpsConfiguration.cpp index 5a6ec6fd..cf591d8f 100644 --- a/Tactility/Source/service/gps/GpsConfiguration.cpp +++ b/Tactility/Source/service/gps/GpsConfiguration.cpp @@ -30,6 +30,13 @@ bool GpsService::getGpsConfigurations(std::vector& c return false; } + // If file does not exist, return empty list + if (access(path.c_str(), F_OK) != 0) { + TT_LOG_W(TAG, "No configurations (file not found: %s)", path.c_str()); + return true; + } + + TT_LOG_I(TAG, "Reading configuration file %s", path.c_str()); auto reader = file::ObjectFileReader(path, sizeof(hal::gps::GpsConfiguration)); if (!reader.open()) { TT_LOG_E(TAG, "Failed to open configuration file");