added more debug for http

This commit is contained in:
Detanup01 2024-11-21 20:09:55 +01:00 committed by GitHub
parent 658bd82689
commit 08e70c79c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -469,7 +469,7 @@ std::string Local_Storage::get_user_appdata_path()
{
std::string user_appdata_path("SAVE");
#if defined(STEAM_WIN32)
WCHAR szPath[MAX_PATH * 10] = {};
WCHAR szPath[MAX_PATH] = {};
HRESULT hr = SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, szPath);
@ -521,6 +521,7 @@ static std::string sanitize_file_name(std::string name)
name = replace_with(name, "*", ".ASTERISK.");
name = replace_with(name, "\"", ".QUOTE.");
name = replace_with(name, "?", ".Q_MARK.");
name = replace_with(name, "%", ".PERCENT.");
return name;
}
@ -538,6 +539,7 @@ static std::string desanitize_file_name(std::string name)
name = replace_with(name, ".ASTERISK.", "*");
name = replace_with(name, ".QUOTE.", "\"");
name = replace_with(name, ".Q_MARK.", "?");
name = replace_with(name, ".PERCENT.", "%");
return name;
}

View File

@ -222,8 +222,9 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t
directory_path = ".";
file_name = request->target_filepath;
}
PRINT_DEBUG("directory: '%s', filename '%s'", directory_path.c_str(), file_name.c_str());
PRINT_DEBUG("directory: '%s', filename '%s', target_filepath '%s'", directory_path.c_str(), file_name.c_str(), request->target_filepath.c_str());
Local_Storage::store_file_data(directory_path, file_name, (char *)"", sizeof(""));
PRINT_DEBUG("Temp file created with empty data"); //TODO remove this
FILE *hfile = std::fopen(request->target_filepath.c_str(), "wb");
if (!hfile) {