瀏覽代碼

Merge pull request #100103 from Summersay415/idsig

Android: Delete `.idsig` on One Click Deploy
Rémi Verschelde 9 月之前
父節點
當前提交
d15e559355
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      platform/android/export/export_plugin.cpp

+ 8 - 5
platform/android/export/export_plugin.cpp

@@ -2145,11 +2145,14 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset,
 
 
 	String tmp_export_path = EditorPaths::get_singleton()->get_temp_dir().path_join("tmpexport." + uitos(OS::get_singleton()->get_unix_time()) + ".apk");
 	String tmp_export_path = EditorPaths::get_singleton()->get_temp_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)
 	((void)0)
 
 
 	// Export to temporary APK before sending to device.
 	// Export to temporary APK before sending to device.