Bug 435341 - File access time is updated when viewing a directory
Summary: File access time is updated when viewing a directory
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.12.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-04 09:44 UTC by Moritz Petersen
Modified: 2021-04-08 10:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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