In the nick87720z fork of tint2 this commit: "Optimizations", 26 Feb 2022: https://gitlab.com/nick87720z/tint2/-/commit/e3699ceb8614ca0b73fa543bd1fcd47b24bee67b broke save_cache(). Nothing gets written to the cache and .xsession-errors shows: tint2: Saving icon theme cache... tint2: Could not save icon theme cache! The commit changed 'fopen(cache_path, "w")' to 'fdopen(fd, "w")', trying to reuse an fd that is already open for the same file (for locking). But that fd was opened O_RDONLY and fdopen() doesn't allow an incompatible mode (opening an O_RDONLY fd for writing). This patch restores the original fopen(cache_path, "w") and the cache works again. I reported it upstream for visibility but it doesn't look like there will be any action there. Reproducible: Always Steps to Reproduce: 1. Delete the $HOME/.cache/tint2/icon.cache file. 2. Start tint2 so it will load some theme icons and try to cache their paths. 3. Look at the cache file created and at messages in .xsession-errors. Actual Results: A 0-byte icon.cache file is created and .xsession-errors shows: tint2: Saving icon theme cache... tint2: Could not save icon theme cache! Expected Results: Non-0 icon.cache file, and no error message in .xsession-errors.
Created attachment 917200 [details, diff] save_cache() patch