From 010497e09534c8a7f8e800ffcd6fa8dd5dacc237 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 5 Oct 2020 14:40:23 +0300 Subject: [PATCH] Don't delete existing mods when copying mods from the external diretory on Android app startup --- android/src/com/unciv/app/AndroidLauncher.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/android/src/com/unciv/app/AndroidLauncher.kt b/android/src/com/unciv/app/AndroidLauncher.kt index f3308ec354..dc421a7e1d 100644 --- a/android/src/com/unciv/app/AndroidLauncher.kt +++ b/android/src/com/unciv/app/AndroidLauncher.kt @@ -53,10 +53,6 @@ class AndroidLauncher : AndroidApplication() { // Mod directory in the shared app data (where the user can see and modify) val externalModsDir = File("${getExternalFilesDir(null)?.path}/mods") - // Empty out the mods directory so it can be replaced by the external one - // Done to ensure it only contains mods in the external dir (so users can delete some) - if (internalModsDir.exists()) internalModsDir.deleteRecursively() - // Copy external mod directory (with data user put in it) to internal (where it can be read) if (!externalModsDir.exists()) externalModsDir.mkdirs() // this can fail sometimes, which is why we check if it exists again in the next line if (externalModsDir.exists()) externalModsDir.copyRecursively(internalModsDir)