We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3312be0 commit 6b0ade4Copy full SHA for 6b0ade4
1 file changed
src/main/kotlin/io/ionic/libs/ioncameralib/manager/IONCAMREditManager.kt
@@ -95,13 +95,15 @@ class IONCAMREditManager(
95
launcher: ActivityResultLauncher<Intent>,
96
onError: (IONCAMRError) -> Unit
97
) {
98
- val imageFile = File(pictureFilePath)
+ val correctedFilePath =
99
+ fileHelper.stripFileProtocol(pictureFilePath) ?: pictureFilePath
100
+ val imageFile = File(correctedFilePath)
101
if (!fileHelper.fileExists(imageFile)) {
102
onError(IONCAMRError.FILE_DOES_NOT_EXIST_ERROR)
103
return
104
}
105
val drawable: Drawable? = try {
- Drawable.createFromPath(pictureFilePath)
106
+ Drawable.createFromPath(correctedFilePath)
107
} catch (ex: Exception) {
108
ex.printStackTrace()
109
null
0 commit comments