-
Notifications
You must be signed in to change notification settings - Fork 130
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 for CSS copying on windows issue #302
Conversation
Merged build triggered. |
Merged build started. |
@@ -130,6 +130,9 @@ private void recursePath(final Path path, final Path resultPath) throws IOExcept | |||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException | |||
{ | |||
String relativePath = StringUtils.substringAfter(file.toString(), path.toString()); | |||
if (relativePath.startsWith("/") && File.separatorChar == '\\') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use the Apache CommonsIO FilenameUtils.separatorsToSystem(String path) to be safe & cut down on verbosity. Also, that same utility has a lot of other useful methods that we could be leveraging throughout:
A few:
normalize(String filename) //normalize unneeded relative paths to simplify the path. ex: a/b/../b becomes a/b
getExtension(String filename) //gets the extension
wildcardMatch(String filename, String wildcardMatcher) //allows you to compare extensions or file names easily via wildcard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I've updated the code with this method.
Merged build finished. Test FAILed. |
Test FAILed. Failed Tests: 1org.jboss.windup.rules.apps:rules-java: 1Test FAILed. |
Merged build triggered. |
Fix for CSS copying on windows issue
Merged build started. |
Merged build finished. Test PASSed. |
Test PASSed. |
* WINDUPRULE-103 Missing EAP 4+5 rules * WINDUPRULE-103 enhanced rule after xmlfile condition fix
No description provided.