Skip to content

Standardise use of CanonicalPath #75

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

Merged
merged 1 commit into from
Dec 21, 2014
Merged

Standardise use of CanonicalPath #75

merged 1 commit into from
Dec 21, 2014

Conversation

rigoford
Copy link
Contributor

Location.scala uses AbstractFile.canonicalPath while
ScoverageHtmlWriter.scala uses java.io.File.getAbsolutePath for file
paths. This mean that there is a possibility (esp. Windows environment)
that creation of reports will fail because the scoverage.coverage.xml
created will contain paths with an upper case drive letter while
ScoverageHtmlWriter will be using paths with a lower case drive letter.

Addresses issue #74

Location.scala uses AbstractFile.canonicalPath while
ScoverageHtmlWriter.scala uses java.io.File.getAbsolutePath for file
paths. This mean that there is a possibility (esp. Windows environment)
that creation of reports will fail because the scoverage.coverage.xml
created will contain paths with an upper case drive letter while
ScoverageHtmlWriter will be using paths with a lower case drive letter.
@gslowikowski
Copy link
Member

To easily reproduce this issue on Windows with Maven run mvn -f c:\path\to\the\project\pom.xml scoverage:report.
Run this from anywhere, using lowercase drive letter ( "c" here). Lowercase "c" will be changed to uppercase by java.io.File.getCanonicalPath() call.

sksamuel added a commit that referenced this pull request Dec 21, 2014
Standardise use of CanonicalPath
@sksamuel sksamuel merged commit 3b9ef28 into scoverage:master Dec 21, 2014
@sksamuel
Copy link
Member

Thanks for this.

@gslowikowski
Copy link
Member

Tried with Maven, it works. Can you release 1.0.2 with this fix?

@sksamuel
Copy link
Member

Yes will do.

@sksamuel
Copy link
Member

1.0.2 is now released, give it some time to appear on central.

@gslowikowski
Copy link
Member

Thanks, add tag for this release, please. @rigoford - scoverage-maven-plugin 1.0.2 is already available.

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