소스 검색

android: Don't crash the app when selecting a zip that causes a SecurityException

Charles Lombardo 3 년 전
부모
커밋
8e8627a258
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt

+ 5 - 1
src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/GpuDriverHelper.kt

@@ -103,7 +103,11 @@ object GpuDriverHelper {
         )
 
         // Unzip the driver.
-        unzip(driverInstallationPath + DRIVER_INTERNAL_FILENAME, driverInstallationPath!!)
+        try {
+            unzip(driverInstallationPath + DRIVER_INTERNAL_FILENAME, driverInstallationPath!!)
+        } catch (e: SecurityException) {
+            return
+        }
 
         // Initialize the driver parameters.
         initializeDriverParameters(context)