summaryrefslogtreecommitdiffstats
path: root/platform/uwp/export/export_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/uwp/export/export_plugin.cpp')
-rw-r--r--platform/uwp/export/export_plugin.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index 88343d6f85..7e06bf01e3 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -295,14 +295,13 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
Error err = OK;
- FileAccess *fa_pack = FileAccess::open(p_path, FileAccess::WRITE, &err);
+ Ref<FileAccess> fa_pack = FileAccess::open(p_path, FileAccess::WRITE, &err);
ERR_FAIL_COND_V_MSG(err != OK, ERR_CANT_CREATE, "Cannot create file '" + p_path + "'.");
AppxPackager packager;
packager.init(fa_pack);
- FileAccess *src_f = nullptr;
- zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
+ zlib_filefunc_def io = zipio_create_io();
if (ep.step("Creating package...", 0)) {
return ERR_SKIP;
@@ -332,6 +331,9 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
unz_file_info info;
char fname[16834];
ret = unzGetCurrentFileInfo(pkg, &info, fname, 16834, nullptr, 0, nullptr, 0);
+ if (ret != UNZ_OK) {
+ break;
+ }
String path = String::utf8(fname);