alex2108 / syncthing-tray

trayicon to display status of syncthing
MIT License
57 stars 9 forks source link

thousands of systray_temp_icon* files temp directory #22

Open kowach opened 8 years ago

kowach commented 8 years ago

I found around 660,000 icon files (taking 2.4GB of space) in my temp directory (on windows 10 x64). systray_temp_icon692992209 and similar.

alex2108 commented 8 years ago

looks like they never get deleted (a problem in systray I assume...) I could add a workaround that deletes every systray_temp_icon* file at startup but in the (unlikely) case that someone runs different programs using systray that could cause problems...

kowach commented 8 years ago

I think that new icon is created every time icon changes in tray. By file timestamp I see it's created every few minutes or seconds.

xor-gate commented 8 years ago

Why is it writing icons anyway? It should just write once and then load/reload the appropiate icon.

xor-gate commented 8 years ago

I'm sorry about my previous comment but it seems to be inside the github.com/getlatern/systray linux implementation:

https://github.com/getlantern/systray/blob/master/systray_linux.c#L11-L12

alex2108 commented 8 years ago

same for windows: https://github.com/getlantern/systray/blob/8e63b37ef27d94f6db79c4ffb941608e8f0dc2f9/systray_windows.go#L66

not sure about OSX, is it done better there?

xor-gate commented 8 years ago

@alex2108 OSX loads it in a different way yes. No temporary file saves to disk (as far as I see).

alex2108 commented 8 years ago

More or less fixed by the latest release. On a crash/forced quit there may stay one icon that never gets deleted but it does not create infinite icons while running.