diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index 59082a4..897432e 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -449,10 +449,15 @@ static void companion(int fd) { std::vector dex, json; - dex = readFile(DEX_PATH); + if (std::filesystem::exists(DEX_PATH)) { + dex = readFile(DEX_PATH); + } - json = readFile(PIF_JSON); - if (json.empty()) json = readFile(PIF_JSON_DEFAULT); + if (std::filesystem::exists(PIF_JSON)) { + json = readFile(PIF_JSON); + } else if (std::filesystem::exists(PIF_JSON_DEFAULT)) { + json = readFile(PIF_JSON_DEFAULT); + } int dexSize = static_cast(dex.size()); int jsonSize = static_cast(json.size());