Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix sort-by-last-read when partition is mounted noatime #3990
Fixes #3988. This just manually updates the atime when an ebook is read (in the history logging code) rather than relying on the kernel. I think this is better than reworking the last-read comparison code to reference the history data automatically; that would be a much larger change, and the history list is trimmed anyway.
This uses the existing luafilesystem touch() call, which calls utime(). Thus, it explicitly reads and preserves the file mtime so that the "by modification" sort view won't be messed up. Philosophically, it would be preferable to call something in the utimensat() family and pass UTIME_OMIT, but the busybox