fix path fetching from content uri at editing
This commit is contained in:
parent
c0c7752f79
commit
093fe92596
|
@ -189,8 +189,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
var newPath = applicationContext.getRealPathFromURI(saveUri) ?: ""
|
var newPath = applicationContext.getRealPathFromURI(saveUri) ?: ""
|
||||||
var shouldAppendFilename = true
|
var shouldAppendFilename = true
|
||||||
if (newPath.isEmpty()) {
|
if (newPath.isEmpty()) {
|
||||||
newPath = applicationContext.getFilenameFromContentUri(saveUri) ?: ""
|
val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: ""
|
||||||
shouldAppendFilename = false
|
if (filename.isNotEmpty()) {
|
||||||
|
newPath = "$internalStoragePath/$filename"
|
||||||
|
shouldAppendFilename = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newPath.isEmpty()) {
|
if (newPath.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue