fix(android): Isolate provider access to a subdirectory (#901)

This commit is contained in:
Norman Breau 2024-10-25 13:09:03 -03:00 committed by GitHub
parent faa4615ee0
commit 44480300d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -367,7 +367,10 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
throw new IllegalArgumentException("Invalid Encoding Type: " + encodingType); throw new IllegalArgumentException("Invalid Encoding Type: " + encodingType);
} }
return new File(getTempDirectoryPath(), fileName); File cacheDir = new File(getTempDirectoryPath(), "org.apache.cordova.camera");
cacheDir.mkdir();
return new File(cacheDir, fileName);
} }

View File

@ -17,5 +17,5 @@
--> -->
<paths xmlns:android="http://schemas.android.com/apk/res/android"> <paths xmlns:android="http://schemas.android.com/apk/res/android">
<cache-path name="cache_files" path="." /> <cache-path name="cache_files" path="org.apache.cordova.camera/" />
</paths> </paths>