pqiv
pqiv copied to clipboard
--watch-files errors on partially updated files
Using pqiv-2.6 with gtk3, pqiv-2.6-7.1.x86_64 (RPM) on CentOS-8
When using --watch-files (whether =on or =changes-only), pqiv occasionally reports a invalid image, and drops it from the list. In my case of watching a single image being periodically fetched with wget, pqiv exits. No combination of options prevents pqiv from exiting, nothing I've tried has helped.
A more desirable behavior would be to continue to display the last valid image, and just wait until the watched image is valid again. With 1-minute updates, this problem only happens every couple days, but can be easily reproduced by truncating an image being displayed and watched. For now, I have resorted to relaunching pqiv whenever it quits.
pqiv already attempts to load files once all modifications are done or when they are created.
A common pattern for what you are trying to do is to download to a different file and then doing an atomic rename/mv once the download is done.