-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Remove temporary files when updating library_index.json #4361
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
Conversation
@cmaglie I'm confirming the fix is OK. Thanks. |
@vicnevicne @matthijskooijman |
@cmaglie The extra commit looks good, that's exactly what I meant indeed. |
@cmaglie : I didn't know renameTo() does overwrite on Unix/Linux, but I know for sure it doesn't on Windows indeed. And the improvement following @matthijskooijman 's suggestion is even better. I checked that the downloader also requires the target file to be deleted beforehand, and it's the case (otherwise it appends to it, which gets detected as a corrupt download and forces the fallback to download the non-gz version). So +1 for the last version, avoiding renameTo() altogether. |
This is a tentatve fix for #4272 #4332, following @vicnevicne hint.
I'm not able to reproduce the bug, @vicnevicne @MichaelJonker if you can reproduce it, by any chanche, can you try the fix? (ArduinoBot should make a build in a moment...)