go-astilectron icon indicating copy to clipboard operation
go-astilectron copied to clipboard

Auto-delete temporary zip files after downloading Electron?

Open koddr opened this issue 3 years ago • 4 comments

Hi,

How to auto-delete temporary files after downloading Electron?

Screenshot 2022-01-06 at 23 15 49

For example, the file electron-darwin-amd64-v16.0.5.zip weighs as much as 83.4 Mb!

koddr avatar Jan 06 '22 20:01 koddr

Right now there's no option to do so, but that's a really good idea.

I won't have time to work on this anytime soon, but I'm welcoming PRs. If you feel like submitting a PR I can guide you about the changes to make.

asticode avatar Jan 07 '22 08:01 asticode

Oh, I see. Okay, I'll try to add that, just please tell me where to look for the Electron source download call in your library?

koddr avatar Jan 07 '22 11:01 koddr

Removing file located at pathUnzipSrc after finish here should make the trick

asticode avatar Jan 07 '22 13:01 asticode

please tell me where to look for the Electron source download call in your library?

In the provisionPackage that provide the finish

where is a function finish func() error

And the finish function will only be executed when a download is required

so we can add os.remove on it.

I will add PRs. later.


Hi @asticode

Is there a need to add some optional (that is, you can choose to keep or delete)? I think you should have considered this issue but finally chose to stay. I'm curious about why you chose to stay.

CarsonSlovoka avatar Mar 22 '22 03:03 CarsonSlovoka