Skip to content

Conversation

@samgst-amazon
Copy link
Contributor

extractZipFile respects posix was not correctly copying over file permissions in 2024.1 for some reason. Explicitly copying the permissions both in the test and in the util function fixes this issue.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@samgst-amazon samgst-amazon requested review from a team as code owners March 28, 2025 21:47
@samgst-amazon samgst-amazon changed the base branch from main to feature/q-lsp March 28, 2025 21:47
@github-actions
Copy link

github-actions bot commented Mar 28, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@samgst-amazon
Copy link
Contributor Author

/retryBuilds

1 similar comment
@samgst-amazon
Copy link
Contributor Author

/retryBuilds

val targetPath = zipfs.getPath("/").resolve(source.relativize(file).toString())
Files.copy(file, targetPath)
val sourcePerms = Files.getPosixFilePermissions(file)
Files.setPosixFilePermissions(targetPath, sourcePerms)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

linux 241 fixed but now this breaks the windows builds:
LSP Error [UNZIP_FAILED]: Failed to extract zip file: Attributes of type java.nio.file.attribute.PosixFileAttributes not supported

Copy link
Contributor

Choose a reason for hiding this comment

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

odd this test should not be running on windows. but also it seems like 241 tests spontaneously fixed themselves?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

241 works here when the permission copying is split up like this in this PR, but from what I see in the feature branch commits 241 is still broken.

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