Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always delete downloader temporary data file #2727

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

nirs
Copy link
Contributor

@nirs nirs commented Oct 11, 2024

If the download failed, the temporary data file (data.tmp.pid) was not deleted. Ensure it is delete in all cases.

Also move the creation of the temporary file right before we need it. The chance that creating a temporary file will fail is practically zero so there is no need to do this upfront. This makes the code easier to follow and maintain.

If the download failed, the temporary data file (data.tmp.pid) was not
deleted. Ensure it is delete in all cases.

Also move the creation of the temporary file right before we need it.
The chance that creating a temporary file will fail is practically zero
so there is no need to do this upfront. This makes the code easier to
follow and maintain.

Signed-off-by: Nir Soffer <[email protected]>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois added this to the v1.0 milestone Oct 11, 2024
@jandubois jandubois merged commit 4561580 into lima-vm:master Oct 11, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants