-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[android] Fix java runner to not assume zip format when unzipping #112654
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
After dotnet#112256 landed, there was a change to zip the test assets using `ZipFile.CreateFromDirectory` for cross platform support. This regressed `unzipAssets` in `MonoRunner.java` because it naivley assumed that directories would come before files in the zip archive. This change fixes the problem by making sure directories are created first before writing files to disk. Fixes dotnet#112558
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/tasks/AndroidAppBuilder/Templates/MonoRunner.java:170
- The FileOutputStream should be closed in a finally block or using a try-with-resources statement to ensure it is always closed.
FileOutputStream fileOutputStream = new FileOutputStream(fullToPath);
|
/azp run runtime-android |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-android |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kotlarmilos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
After #112256 landed, there was a change to zip the test assets using
ZipFile.CreateFromDirectoryfor cross platform support. This regressedunzipAssetsinMonoRunner.javabecause it naivley assumed that directories would come before files in the zip archive.This change fixes the problem by making sure directories are created first before writing files to disk.
Fixes #112558