Skip to content

Commit

Permalink
Fix the Windows regression around <
Browse files Browse the repository at this point in the history
Prior to zinc 712, this code looked like:

```scala
          // This lookup could be improved if a hint where to look is given.
          outputDirs.map(new File(_, classFilePath)).find(_.exists()).map(AbstractFile.getFile(_))
```

When I ported this to NIO Path, it started to error on Windows because `<` are not allowed as path character. This change should at least get back to the state, hopefully.
  • Loading branch information
eed3si9n committed Apr 23, 2020
1 parent 532920d commit a7d9dde
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ sealed class ZincCompiler(settings: Settings, dreporter: DelegatingReporter, out

case None => // The compiler outputs class files in a classes directory (the default)
// This lookup could be improved if a hint where to look is given.
outputDirs
.map(_.resolve(classFilePath))
.find(Files.exists(_))
.map(Compat.plainNioFile(_))
if (classFilePath.contains("<")) None
else
outputDirs
.map(_.resolve(classFilePath))
.find(Files.exists(_))
.map(Compat.plainNioFile(_))
}
}

Expand Down

0 comments on commit a7d9dde

Please sign in to comment.