mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 17:11:51 +01:00
Fix crash when saving a page from certain chapters (#8242)
This commit is contained in:
parent
6756bfab75
commit
84bcd8d1d2
@ -101,14 +101,13 @@ class ImageSaver(
|
|||||||
MediaStore.MediaColumns.DATE_MODIFIED,
|
MediaStore.MediaColumns.DATE_MODIFIED,
|
||||||
)
|
)
|
||||||
|
|
||||||
val selection = "${MediaStore.MediaColumns.RELATIVE_PATH}='$relativePath' AND " +
|
val selection = "${MediaStore.MediaColumns.RELATIVE_PATH}=? AND ${MediaStore.MediaColumns.DISPLAY_NAME}=?"
|
||||||
"${MediaStore.MediaColumns.DISPLAY_NAME}='$imagePath'"
|
|
||||||
|
|
||||||
context.contentResolver.query(
|
context.contentResolver.query(
|
||||||
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||||
projection,
|
projection,
|
||||||
selection,
|
selection,
|
||||||
null,
|
arrayOf(relativePath, imagePath),
|
||||||
null,
|
null,
|
||||||
).use { cursor ->
|
).use { cursor ->
|
||||||
if (cursor != null && cursor.count >= 1) {
|
if (cursor != null && cursor.count >= 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user