mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
try getting real filename from content uri at Edit Activity
This commit is contained in:
parent
5e44ce356c
commit
c0c7752f79
1 changed files with 5 additions and 0 deletions
|
@ -188,6 +188,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
} else if (saveUri.scheme == "content") {
|
||||
var newPath = applicationContext.getRealPathFromURI(saveUri) ?: ""
|
||||
var shouldAppendFilename = true
|
||||
if (newPath.isEmpty()) {
|
||||
newPath = applicationContext.getFilenameFromContentUri(saveUri) ?: ""
|
||||
shouldAppendFilename = false
|
||||
}
|
||||
|
||||
if (newPath.isEmpty()) {
|
||||
newPath = "$internalStoragePath/${getCurrentFormattedDateTime()}.${saveUri.toString().getFilenameExtension()}"
|
||||
shouldAppendFilename = false
|
||||
|
|
Loading…
Reference in a new issue