Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

[Android] Do not apply directory encryption if PCK encryption is disabled.

Pāvels Nadtočajevsbe1c9138f777
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 7b17b6970f4..1b0d2858ed1 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -3820,7 +3820,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
} else {
user_data.pd.path = "assets.sparsepck";
user_data.pd.use_sparse_pck = true;
- if (p_preset->get_enc_directory()) {
+ if (p_preset->get_enc_pck() && p_preset->get_enc_directory()) {
RandomPCG rng = RandomPCG(p_preset->get_seed());
for (int i = 0; i < 32; i++) {
user_data.pd.salt += String::chr(1 + rng.rand() % 254);
@@ -4327,7 +4327,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
ed.apk = unaligned_apk;
ed.pd.path = "assets.sparsepck";
ed.pd.use_sparse_pck = true;
- if (p_preset->get_enc_directory()) {
+ if (p_preset->get_enc_pck() && p_preset->get_enc_directory()) {
RandomPCG rng = RandomPCG(p_preset->get_seed());
for (int i = 0; i < 32; i++) {
ed.pd.salt += String::chr(1 + rng.rand() % 254);