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

Reuse filesystem accessed by different uri to the same file #1201

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

fp7
Copy link
Contributor

@fp7 fp7 commented Dec 24, 2024

When a jar file was opened with different uris pointing to the same file they would return the same file system because the jdk normalizes the uri, eg jar:file:/tmp/../tmp/file.jar becomes jar:file:/tmp/file.jar.

Therefore the number of users of one filesystem was incorrect and it might have been closed while still in use.

This occured eg. in mono repos with multiple intellij plugins and parallel builds.

@YannCebron YannCebron requested a review from novotnyr January 7, 2025 08:54
When a jar file was opened with different uris pointing to the same
file they would return the same file system because the jdk
normalizes the uri, eg jar:file:/tmp/../tmp/file.jar
becomes jar:file:/tmp/file.jar.

Therefore the number of users of one filesystem was incorrect
and it might have been closed while still in use.

This occured eg. in mono repos with multiple intellij plugins
and parallel builds.
@fp7 fp7 force-pushed the fp7/fix-fs-users branch from 99ec222 to e2a2835 Compare January 7, 2025 11:14
@fp7
Copy link
Contributor Author

fp7 commented Jan 7, 2025

Sorry, I somehow completely missed the other tests. I fixed the failing ones and made sure that a ./gradlew build works on my machine.

@novotnyr
Copy link
Collaborator

This is a very nice catch and an improvement!

Thanks for your contribution.

@novotnyr novotnyr merged commit 222912f into JetBrains:master Jan 29, 2025
2 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