Skip to content

Commit a48300e

Browse files
committed
get Recents file name from its path, if not filled in
1 parent 9f15dc3 commit a48300e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/RecentsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
122122

123123
context?.queryCursor(uri, projection, sortOrder = sortOrder, showErrors = true) { cursor ->
124124
val path = cursor.getStringValue(FileColumns.DATA)
125-
val name = cursor.getStringValue(FileColumns.DISPLAY_NAME)
125+
val name = cursor.getStringValue(FileColumns.DISPLAY_NAME) ?: path.getFilenameFromPath()
126126
val size = cursor.getLongValue(FileColumns.SIZE)
127127
val modified = cursor.getLongValue(FileColumns.DATE_MODIFIED) * 1000
128128
val fileDirItem = ListItem(path, name, false, 0, size, modified, false)

0 commit comments

Comments
 (0)