Bug 435341

Summary: File access time is updated when viewing a directory
Product: [Applications] dolphin Reporter: Moritz Petersen <moritz.petersen>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kfm-devel, nate, sitter
Priority: NOR    
Version: 20.12.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Moritz Petersen 2021-04-04 09:44:24 UTC
When a directory is viewed in dolphin, files with certain extensions have their atimes updated.

STEPS TO REPRODUCE
1. disable all previews in dolphin
2. create an empty file with .ogg extension
3. navigate dolphin to the containing directory

OBSERVED RESULT
The atime of the file has been updated.

EXPECTED RESULT
No action was taken to view/open/otherwise access the file, so the atime should not change.

Operating System: openSUSE Tumbleweed 20210329
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.6-1-default

ADDITIONAL INFORMATION
Other affected extensions: .out

The same behaviour can also be observed in Konqueror, but not in Thunar, Nautilus, PCManFM, PCManFM-Qt or QtFM
Comment 1 Harald Sitter 2021-04-08 10:16:40 UTC
Mimetype probing might require accessing files to look for binary markers in the file itself, which I expect is what causes this behavior. I've checked and couldn't find where the POSIX spec says that atime changes require any sort of view or option action. In fact the only relevant bit of information is [1]

> struct timespec st_atim Last data access timestamp. 

Opening the file to detect its mimetype is certainly data access. This seems consistent behavior.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html