Repository: godotengine/godot (language: cpp)

Issue:
`*.idsig` is not removed after One Click Deploy
### Tested versions

- Reproducible in 4.4.dev4

### System information

Godot v4.4.dev4 - Arch Linux #1 SMP PREEMPT_DYNAMIC Fri, 22 Nov 2024 16:04:27 +0000 on Wayland - X11 display driver, Single-window, 1 monitor - OpenGL 3 (Compatibility) - Mesa Intel(R) Graphics (ADL GT2) - 12th Gen Intel(R) Core(TM) i5-1235U (12 threads)

### Issue description

After clicking One Click Deploy and exporting to Android, temporary export apk is removed, but .idsig (which is artifact of signing) is not. This pollutes editor cache directory.

### Steps to reproduce

1. Use One Click Deploy to Android.
2. Open editor cache folder.
3. Notice `tmpexport.*.apk` removed, but `tmpexport.*.apk.idsig` is still there.

### Minimal reproduction project (MRP)

N/A


Discussion / hints:

Fix patch:
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 293044a8fa0c..5523b5b062e4 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -2087,11 +2087,14 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
 
 	String tmp_export_path = EditorPaths::get_singleton()->get_cache_dir().path_join("tmpexport." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
 
-#define CLEANUP_AND_RETURN(m_err)                         \
-	{                                                     \
-		DirAccess::remove_file_or_error(tmp_export_path); \
-		return m_err;                                     \
-	}                                                     \
+#define CLEANUP_AND_RETURN(m_err)                                        \
+	{                                                                    \
+		DirAccess::remove_file_or_error(tmp_export_path);                \
+		if (FileAccess::exists(tmp_export_path + ".idsig")) {            \
+			DirAccess::remove_file_or_error(tmp_export_path + ".idsig"); \
+		}                                                                \
+		return m_err;                                                    \
+	}                                                                    \
 	((void)0)
 
 	// Export to temporary APK before sending to device.


Test patch: