Skip to content

Commit fb3384f

Browse files
authored
fix: trust the system to check whether a file is a directory (#261)
Condition was originally introduced in 12b96e1 Refs: #80
1 parent 666c8d8 commit fb3384f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- Fixed folders showing up incorrectly as files in some cases ([#80])
810

911
## [1.2.2] - 2025-09-01
1012
### Changed
@@ -58,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5860

5961
[#27]: https://github.com/FossifyOrg/File-Manager/issues/27
6062
[#37]: https://github.com/FossifyOrg/File-Manager/issues/37
63+
[#80]: https://github.com/FossifyOrg/File-Manager/issues/80
6164
[#105]: https://github.com/FossifyOrg/File-Manager/issues/105
6265
[#106]: https://github.com/FossifyOrg/File-Manager/issues/106
6366
[#120]: https://github.com/FossifyOrg/File-Manager/issues/120

app/src/main/kotlin/org/fossify/filemanager/fragments/ItemsFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class ItemsFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerF
257257
}
258258

259259
var lastModified = lastModifieds.remove(curPath)
260-
val isDirectory = if (lastModified != null) false else file.isDirectory
260+
val isDirectory = file.isDirectory
261261
val children = if (isDirectory && getProperChildCount) file.getDirectChildrenCount(context, showHidden) else 0
262262
val size = if (isDirectory) {
263263
if (isSortingBySize) {

0 commit comments

Comments
 (0)