From fb62c297fa7e5ca9d4c3876bcf050e6a034bab81 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 9 Sep 2020 22:25:02 +0200 Subject: [PATCH] patch_manager: log g_tls_error --- Utilities/bin_patch.cpp | 8 ++++---- rpcs3/rpcs3qt/patch_manager_dialog.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 0887a097ae..e662b4c85e 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -73,7 +73,7 @@ std::string patch_engine::get_patch_config_path() if (!fs::create_path(config_dir)) { - patch_log.error("Could not create path: %s", patch_path); + patch_log.error("Could not create path: %s (%s)", patch_path, fs::g_tls_error); } return patch_path; @@ -825,7 +825,7 @@ void patch_engine::save_config(const patch_map& patches_map, bool enable_legacy_ fs::file file(path, fs::rewrite); if (!file) { - patch_log.fatal("Failed to open patch config file %s", path); + patch_log.fatal("Failed to open patch config file %s (%s)", path, fs::g_tls_error); return; } @@ -978,8 +978,8 @@ bool patch_engine::save_patches(const patch_map& patches, const std::string& pat fs::file file(path, fs::rewrite); if (!file) { - patch_log.fatal("save_patches: Failed to open patch file %s", path); - append_log_message(log_messages, fmt::format("Failed to open patch file %s", path)); + patch_log.fatal("save_patches: Failed to open patch file %s (%s)", path, fs::g_tls_error); + append_log_message(log_messages, fmt::format("Failed to open patch file %s (%s)", path, fs::g_tls_error)); return false; } diff --git a/rpcs3/rpcs3qt/patch_manager_dialog.cpp b/rpcs3/rpcs3qt/patch_manager_dialog.cpp index fba797f4ad..04ae1a9084 100644 --- a/rpcs3/rpcs3qt/patch_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/patch_manager_dialog.cpp @@ -846,7 +846,7 @@ void patch_manager_dialog::download_update() } else { - patch_log.error("Could not open patch file: %s", path); + patch_log.error("Could not open patch file: %s (%s)", path, fs::g_tls_error); return; } } @@ -945,7 +945,7 @@ bool patch_manager_dialog::handle_json(const QByteArray& data) if (const std::string path_old = path + ".old"; !fs::copy_file(path, path_old, true)) { - patch_log.error("Could not back up current patches to %s", path_old); + patch_log.error("Could not back up current patches to %s (%s)", path_old, fs::g_tls_error); return false; } } @@ -957,7 +957,7 @@ bool patch_manager_dialog::handle_json(const QByteArray& data) } else { - patch_log.error("Could not save new patches to %s", path); + patch_log.error("Could not save new patches to %s (%s)", path, fs::g_tls_error); return false; }