From 740a1e4e20ad74374313733f9408ededb5736ae2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 26 Feb 2018 11:26:58 +0100 Subject: [PATCH] fix saving images on the SD card --- .../com/simplemobiletools/camera/helpers/PhotoProcessor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/PhotoProcessor.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/PhotoProcessor.kt index 9bb9247a..e6855203 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/PhotoProcessor.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/PhotoProcessor.kt @@ -49,7 +49,7 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId return "" } - var document = activity.getDocumentFile(path) + var document = activity.getDocumentFile(path.getParentPath()) document = document?.createFile("", path.substring(path.lastIndexOf('/') + 1)) fos = activity.contentResolver.openOutputStream(document?.uri) } else {