This is an automated email from the ASF dual-hosted git repository.

normanbreau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-camera.git


The following commit(s) were added to refs/heads/master by this push:
     new 4448030  fix(android): Isolate provider access to a subdirectory (#901)
4448030 is described below

commit 44480300d941e888313eb9e5bc986c9e18d563a4
Author: Norman Breau <nor...@breautek.com>
AuthorDate: Fri Oct 25 13:09:03 2024 -0300

    fix(android): Isolate provider access to a subdirectory (#901)
---
 src/android/CameraLauncher.java           | 5 ++++-
 src/android/xml/camera_provider_paths.xml | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java
index 5b2a9a9..6dfe3cb 100644
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -367,7 +367,10 @@ public class CameraLauncher extends CordovaPlugin 
implements MediaScannerConnect
             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);
     }
 
 
diff --git a/src/android/xml/camera_provider_paths.xml 
b/src/android/xml/camera_provider_paths.xml
index 3266748..7c3584c 100644
--- a/src/android/xml/camera_provider_paths.xml
+++ b/src/android/xml/camera_provider_paths.xml
@@ -17,5 +17,5 @@
 -->
 
 <paths xmlns:android="http://schemas.android.com/apk/res/android";>
-    <cache-path name="cache_files" path="." />
-</paths>
\ No newline at end of file
+    <cache-path name="cache_files" path="org.apache.cordova.camera/" />
+</paths>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to