spillerrec / imgviewer

Customizable image viewer with minimalistic interface
2 stars 1 forks source link

Files added in current directory can fail to load #16

Open spillerrec opened 10 years ago

spillerrec commented 10 years ago

When files are created in the currently opened directory, imgviewer might try to load the image before it have been fully written to disk. This cause the loading to fail and the image is not viewable. simplefilewatcher (https://code.google.com/p/simplefilewatcher/) appears to be able to track changes to every file in the directory, try to use that instead and reload the images if they are changed. That will hopefully solve this. Otherwise try to reload failing images, or increase the wait before loading the directory changes?

spillerrec commented 9 years ago

Watching the directory for changes would likely improve the code clarity and performance as well, instead of reloading everything and patching it up to avoid it being noticed...