You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Temporary .ico files created by NativeImage should be cleaned #22500
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
Electron Version:
7.1.10
Operating System:
Windows 10 (1909)
Expected Behavior
Temporary .tmp.ico files created by NativeImage in \Users\<user>\AppData\Local\Temp\ should be cleaned after NativeImage is destroyed or when application exits.
Actual Behavior
The .tmp.ico file is left in \Users\<user>\AppData\Local\Temp. If the application is opened multiple times there are multiple temporary icons.
To Reproduce
Create a NativeImage with an .ico file archived in an asar-archive
Start the application
2a. Check that a .tmp.ico file was created in \Users\<user>\AppData\Local\Temp\
Quit the application
3a. Notice that the file wasn't deleted
Additional Information
This is related to #10796 with the difference that #10796 answered whether or not the files could be deleted and didn't address that they should be deleted automatically.
Because these files are created in Temp they can (and will) be cleaned by the OS whenever it wants to. Them being left behind is ok as the OS will clean this folder up.
Reacted by l-uuz, kfalcetano, austinw-fineart and Gitoffthelawn
@MarshallOfSound there is absolutely no way this can be addressed in the future by reading the ICO directly from memory (asar) vs. extracting it to filesystem? Seems like you dismiss the case without consideration. I realise you guys have plenty of work to do besides dealing with this, but sounds like a good improvement either way.
Reacted by pushkin-, maffe, l-uuz, kfalcetano and Gitoffthelawn
Can this be re-opened please? It's still an issue. Windows does not automatically empty the system temp folder when third-party apps leave orphaned files in that folder. It relies on apps to clean up their own mess.
Activity
pronebird commentedon Mar 3, 2020
Would it be possible to load icon directly from ASAR instead of dumping it to disk first?
MarshallOfSound commentedon Mar 3, 2020
Because these files are created in
Tempthey can (and will) be cleaned by the OS whenever it wants to. Them being left behind is ok as the OS will clean this folder up.pronebird commentedon Mar 4, 2020
@MarshallOfSound there is absolutely no way this can be addressed in the future by reading the ICO directly from memory (asar) vs. extracting it to filesystem? Seems like you dismiss the case without consideration. I realise you guys have plenty of work to do besides dealing with this, but sounds like a good improvement either way.
Gitoffthelawn commentedon Apr 8, 2026
Can this be re-opened please? It's still an issue. Windows does not automatically empty the system temp folder when third-party apps leave orphaned files in that folder. It relies on apps to clean up their own mess.