Skip to content

composetable: invalidate cache based on symlink mtime too

Naïm Favier requested to merge ncfavier/gtk:compose-cache-symlinks into master

When the compose file is a symbolic link, take the link itself's modification time into account (in addition to its target's) in determining whether to invalidate the compose cache.

This is useful e.g. on NixOS systems where the compose file might point to a store path with an irrelevant modification time, and we want the cache to expire when the symlink itself changes.

This mirrors a pull request in ibus (https://github.com/ibus/ibus/pull/2362) since there seems to be some duplicated logic between here and there.

There was no error handling for the g_stat calls, should it be added?

Merge request reports