brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.31k stars 620 forks source link

Stop trying to access filesystems that are no longer in dynamically generated conky text #2023

Closed quiescens closed 2 months ago

quiescens commented 2 months ago

Checklist

Description

Dynamically updated conky texts that use "fs" variables can leave their entries in fs_stats after they have been removed from the text dynamically.

Instead of having update_fs_stats() call update_fs_stat() for all entries that have the "set" flag, just clear the "set" flag. This will "remove" the current fs_stats entries (including in particular, filesystems that no longer appear in the conky text).

On the next update cycle, prepare_fs_stat() will call update_fs_stat() for anything that requires it, and will retain the logic that prevents it from updating the same fs multiple times.

Note: Depending on how well update frequencies line up, it is still possible to get stat errors but they won't continue forever.

netlify[bot] commented 2 months ago

Deploy Preview for conkyweb canceled.

Name Link
Latest commit 756f944a539ce24ee830df0d8f4b211f8b9c5dcb
Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/66cff6bbefeca00008fe12a3