From f2ff463c085b022215141cf393df9d08e35a9247 Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Mon, 25 Oct 2021 18:40:05 -0700 Subject: [PATCH] steam_helper: create Config directory This is checked by CEG. CW-Bug-Id: #15930 --- steam_helper/steam.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 0c1d95fd..5cad86c6 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -1061,8 +1061,9 @@ static BOOL steam_protocol_handler(int argc, char *argv[]) static void setup_steam_files(void) { - static const WCHAR libraryfolders_nameW[] = L"C:\\Program Files (x86)\\Steam\\steamapps\\libraryfolders.vdf"; + static const WCHAR config_pathW[] = L"C:\\Program Files (x86)\\Steam\\config"; static const WCHAR steamapps_pathW[] = L"C:\\Program Files (x86)\\Steam\\steamapps"; + static const WCHAR libraryfolders_nameW[] = L"C:\\Program Files (x86)\\Steam\\steamapps\\libraryfolders.vdf"; const char *steam_install_path = getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH"); const char *steam_library_paths = getenv("STEAM_COMPAT_LIBRARY_PATHS"); const char *start, *end, *next; @@ -1070,6 +1071,12 @@ static void setup_steam_files(void) std::string contents; char idx_str[10]; + if (!CreateDirectoryW(config_pathW, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) + { + WINE_ERR("Failed to create config directory, GetLastError() %u.\n", GetLastError()); + return; + } + if (!CreateDirectoryW(steamapps_pathW, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) { WINE_ERR("Failed to create steamapps directory, GetLastError() %u.\n", GetLastError());