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

fix: remove the user directory only at the start of paths (in messages) #1206

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

rdeltour
Copy link
Member

The previous implementation of the removeWorkingDirectory utility
method was quite brutal and replaced all occurences of the "user.dir"
system property in paths, even when found in the middle of the path.

The new implementation only replaces the user directory when it occurs
at the beginning of the path, and does nothing when the user directory
is set to the root directory ("/").

Tests included.

Fixes #1181

The previous implementation of the `removeWorkingDirectory` utility
method was quite brutal and replaced all occurences of the "user.dir"
system property in paths, even when found in the middle of the path.

The new implementation only replaces the user directory when it occurs
at the beginning of the path, and does nothing when the user directory
is set to the root directory ("/").

Tests included.

Fixes #1181
@rdeltour rdeltour added the status: accepted Ready to be further processed label Feb 26, 2021
@rdeltour rdeltour added this to the v4.2.5 milestone Feb 26, 2021
@rdeltour rdeltour self-assigned this Feb 26, 2021
@rdeltour rdeltour merged commit 5ee72e7 into master Feb 26, 2021
@rdeltour rdeltour deleted the fix/1181/pathutil branch February 26, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Ready to be further processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in w3c/epubcheck/src/main/java/com/adobe/epubcheck/util/PathUtil.java
1 participant