diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index 8da181faf..08ad5f80e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -887,7 +887,7 @@ fun Context.getDirectorySortingValue(media: ArrayList, path: String, nam val sorting = config.directorySorting val sorted = when { sorting and SORT_BY_NAME != 0 -> return name - sorting and SORT_BY_PATH != 0 -> return path + sorting and SORT_BY_PATH != 0 -> return path.getParentPath() sorting and SORT_BY_SIZE != 0 -> return size.toString() sorting and SORT_BY_DATE_MODIFIED != 0 -> media.sortedBy { it.modified } sorting and SORT_BY_DATE_TAKEN != 0 -> media.sortedBy { it.taken }