Skip to content

Fix UnionPath existence checks with nested union file systems#53

Merged
marchermans merged 1 commit intoMcModLauncher:mainfrom
Technici4n:path-exist-fix
Nov 21, 2023
Merged

Fix UnionPath existence checks with nested union file systems#53
marchermans merged 1 commit intoMcModLauncher:mainfrom
Technici4n:path-exist-fix

Conversation

@Technici4n
Copy link
Copy Markdown
Contributor

Fixes Files.exists always returning true for layered/nested UnionFileSystems. The bug happens because of a missing else branch in checkAccess for non-default and non-zip file systems.

Added a test to reproduce the issue, and consolidated the fs-specific code to avoid such issues in the future.

Comment thread src/main/java/cpw/mods/niofs/union/UnionFileSystem.java
@Technici4n
Copy link
Copy Markdown
Contributor Author

Note: The broken behavior only appeared after 482f95d, but that commit is not really to blame - it removed checks that should have been redundant, but were in fact not because of that forgotten else.

@marchermans marchermans merged commit 008028a into McModLauncher:main Nov 21, 2023
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.

3 participants