From aac31feda659dc042c4d49ce23a5fd5535fa6af4 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 15 Mar 2024 11:41:48 +0200 Subject: [PATCH] [Windows] Fix exporting as ZIP when console wrapper and/or embedded PCK is enabled. --- platform/windows/export/export_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index 0c6721e118bb..fe2a930cc841 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -285,15 +285,15 @@ Error EditorExportPlatformWindows::export_project(const Ref if (p_preset->get("codesign/enable")) { _code_sign(p_preset, pck_path); - String wrapper_path = p_path.get_basename() + ".console.exe"; + String wrapper_path = path.get_basename() + ".console.exe"; if (FileAccess::exists(wrapper_path)) { _code_sign(p_preset, wrapper_path); } } if (embedded) { - Ref tmp_dir = DirAccess::create_for_path(p_path.get_base_dir()); - err = tmp_dir->rename(pck_path, p_path); + Ref tmp_dir = DirAccess::create_for_path(path.get_base_dir()); + err = tmp_dir->rename(pck_path, path); if (err != OK) { add_message(EXPORT_MESSAGE_ERROR, TTR("PCK Embedding"), vformat(TTR("Failed to rename temporary file \"%s\"."), pck_path)); }