Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fixed invalid MediaStore URI crash when overwriting edited images on scoped-storage devices ([#1031])

## [1.13.1] - 2026-02-14
### Changed
Expand Down
17 changes: 12 additions & 5 deletions app/src/main/kotlin/org/fossify/gallery/extensions/Activity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1019,11 +1019,18 @@ fun BaseSimpleActivity.ensureWritablePath(
}

fun requestGrantsThenProceed() {
if (isRPlus() && !isExternalStorageManager()) {
val fileDirItem = arrayListOf(File(targetPath).toFileDirItem(this))
val fileUris = getFileUrisFromFileDirItems(fileDirItem)
updateSDK30Uris(fileUris) { success ->
if (success) proceedAfterGrants() else onCancel?.invoke()
if (isRPlus() && !isExternalStorageManager() && getDoesFilePathExist(targetPath)) {
val fileDirItems = arrayListOf(File(targetPath).toFileDirItem(this))
resolveMediaStoreUris(fileDirItems) { resolution ->
val fileUris = resolution.uris
if (fileUris.isEmpty()) {
proceedAfterGrants()
return@resolveMediaStoreUris
}

updateSDK30Uris(fileUris) { success ->
if (success) proceedAfterGrants() else onCancel?.invoke()
}
}
} else {
proceedAfterGrants()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exif = "1.0.1"
#Room
room = "2.8.4"
#Fossify
commons = "6.1.6"
commons = "7.0.0"
#Gradle4
gradlePlugins-agp = "9.2.0"
#Other
Expand Down
Loading