Skip to content

Commit

Permalink
Fixes #540 failed to write back edited file on some devices
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Jun 28, 2024
1 parent 5880879 commit 92b3163
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ContentResolverUtil @Inject constructor(context: Context) {
contentResolver.query(uri, null, null, null, null).use { cursor ->
if (cursor != null && cursor.moveToFirst()) {
val dateModifiedColumnIndex = cursor.getColumnIndex(DocumentsContract.Document.COLUMN_LAST_MODIFIED)
if (!cursor.isNull(dateModifiedColumnIndex)) {
if (dateModifiedColumnIndex != -1) {
val date = cursor.getLong(dateModifiedColumnIndex)
return Date(date);
}
Expand Down

0 comments on commit 92b3163

Please sign in to comment.