Skip to content

Conversation

@steveisok
Copy link
Member

After #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 #112558

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
Copilot AI review requested due to automatic review settings February 18, 2025 15:13
Copy link
Contributor

Copilot AI left a 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);

@steveisok
Copy link
Member Author

/azp run runtime-android

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@steveisok
Copy link
Member Author

/azp run runtime-android

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kotlarmilos kotlarmilos left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android][Tests] Android library tests with content items fail: Could not find a part of the path /data/data

3 participants