Fix linux CI build.

This commit is contained in:
Mr_Goldberg 2022-01-26 03:07:49 -05:00
parent f852e5c272
commit eda9abd2aa
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
1 changed files with 13 additions and 6 deletions

View File

@ -44,15 +44,11 @@ static char old_inventory[128] = "STEAMINVENTORY_INTERFACE_V001";
static char old_video[128] = "STEAMVIDEO_INTERFACE_V001";
static char old_masterserver_updater[128] = "SteamMasterServerUpdater001";
static void load_old_interface_versions()
static bool try_load_steam_interfaces(std::string interfaces_path)
{
static bool loaded = false;
if (loaded) return;
std::string interfaces_path = Local_Storage::get_program_path() + "steam_interfaces.txt";
std::ifstream input( utf8_decode(interfaces_path) );
if (!input.is_open()) {
interfaces_path = Local_Storage::get_game_settings_path() + "steam_interfaces.txt";
input = std::ifstream(utf8_decode(interfaces_path));
return false;
}
PRINT_DEBUG("load from: %s\n", interfaces_path.c_str());
@ -88,6 +84,17 @@ static void load_old_interface_versions()
#undef REPLACE_WITH_FILE
}
return true;
}
static void load_old_interface_versions()
{
static bool loaded = false;
if (loaded) return;
if (!try_load_steam_interfaces(Local_Storage::get_game_settings_path() + "steam_interfaces.txt"))
try_load_steam_interfaces(Local_Storage::get_program_path() + "steam_interfaces.txt");
PRINT_DEBUG("client: %s\n", old_client);
PRINT_DEBUG("gameserver: %s\n", old_gameserver);
PRINT_DEBUG("gameserver stats: %s\n", old_gameserver_stats);