Bug 455315 - Dolphin fails to sort by sub-second modification time
Summary: Dolphin fails to sort by sub-second modification time
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 22.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-15 09:38 UTC by Arne Keller
Modified: 2022-06-15 09:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Keller 2022-06-15 09:38:40 UTC
SUMMARY
If several files are modified in the same second, Dolphin will sort them by name instead of modification time.

STEPS TO REPRODUCE
1. Open a terminal, navigate to some directory
2. Execute `touch file1; touch file3; touch file2`
3. Check that `stat file*` reports three different timestamps. You may need to repeat step 2 if some are equal.
4. Open Dolphin in that directory
5. Switch to details view, sort by modification time

OBSERVED RESULT
Files are sorted by name

EXPECTED RESULT
Files are sorted by modification time

SOFTWARE/OS VERSIONS
Operating System: NixOS 22.05
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.10.118 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
stat output (abridged):
File: file1
Modify: 2022-06-15 11:30:42.328851880 +0200
File: file2
Modify: 2022-06-15 11:30:42.330851877 +0200
File: file3
Modify: 2022-06-15 11:30:42.329851878 +0200

These code segments may be related:
https://invent.kde.org/system/dolphin/-/blob/698e25d8485b9b82ebd28eb9b1b2641bebb35d77/src/kitemviews/kfileitemmodel.cpp#L2055
https://api.kde.org/frameworks/kio/html/udsentry_8cpp_source.html#l00360