jira-importer commented on issue #880: URL: https://github.com/apache/maven-scm/issues/880#issuecomment-2964630996
**[Mirko Friedenhagen](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mfriedenhagen)** commented An even better solution would probably look like this: ``` static String addTarget(final File workingDir, final List<File> files) { try { final URI wdURI = workingDir.getCanonicalFile().toURI(); final StringBuilder sb = new StringBuilder(); for (final File f : files) { final String relativeFile = wdURI.relativize(f.getCanonicalFile().toURI()).getPath(); sb.append(" ").append(relativeFile); } return String.valueOf(sb); } catch (IOException ex) { throw new IllegalArgumentException("arg", ex); } } ``` I will hopefully give it a try this evening and submit a patch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
