From 870ec7345bcda7cc1761ec90bddce8290ce1fae4 Mon Sep 17 00:00:00 2001 From: Nicole O'Connor Date: Mon, 3 Feb 2025 17:01:38 -0800 Subject: [PATCH] find_steam_libraries now returns an empty result if it can't read libraryfolders.vdf for some reason --- src/steam/paths.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/steam/paths.cpp b/src/steam/paths.cpp index 9fcc10c..4c4fada 100644 --- a/src/steam/paths.cpp +++ b/src/steam/paths.cpp @@ -17,8 +17,10 @@ std::vector cellar::steam::find_steam_libraries() { sstr_steam_library_config << std::getenv("HOME"); sstr_steam_library_config << "/.steam/root/config/libraryfolders.vdf"; std::string str_steam_library_config = sstr_steam_library_config.str(); + std::vector result = {}; std::ifstream fd_steam_library_config(str_steam_library_config); + if (fd_steam_library_config.fail()) { return result; } // return empty if something went wrong (should cover most problems) auto hnd_steam_library_config = vdf::read(fd_steam_library_config); std::vector result;