Image doesn't reload when all files are deleted and then replaced
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 752
- Avg merge
- 10d 14h
- Merged PRs (30d)
- 1
Description
System information:
- Windows OS version: Windows 10
- ImageGlass version: 5.5.7.26
To Reproduce
Steps to reproduce the behavior:
- Open a PNG file with ImageGlass.
- Rewrite the image with an external tool. In my case, I am using Spine to pack a texture atlas. Spine deletes the image file, performs texture packing (which can take between milliseconds to a couple seconds), then a new image is written.
Actual behavior:
ImageGlass goes blank, then either reloads the file and shows the new content (as desired), or does nothing and stays blank (not desired). It stays blank about 33% of the time. This is very frustrating, as I have to go to the file on disk and open it again.
Expected behavior:
I expect ImageGlass to always reload the file and show the new content, never to stay blank.
Additional context:
My guess is that ImageGlass sees the image has been deleted, then gives up too quickly. When the new image file is created with the same name, ImageGlass has already given up and doesn't load it. It would be great if, when ImageGlass sees the file it has loaded has been deleted, that ImageGlass would continue looking for that file in case it comes back.
If there must be a timeout, it could be quite long (maybe 5-10 seconds), but I don't think it ever needs to timeout. If the file ever comes back, it should be reloaded.
BTW, thank you again for all the effort you put into ImageGlass!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reproducing the delete-and-replace sequence on Windows 10 and trace ImageGlass's file-change handling when the currently viewed image disappears. Done means the replacement image is reliably reloaded instead of leaving the viewer blank.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100