Use IO.toFile

This commit is contained in:
Eugene Yokota 2017-04-12 03:50:35 -04:00
parent d323c67c95
commit b0b5396769
1 changed files with 1 additions and 1 deletions

View File

@ -2290,7 +2290,7 @@ object Classpaths {
i.url.getProtocol match {
case "file" =>
// This hackery is to deal suitably with UNC paths on Windows. Once we can assume Java7, Paths should save us from this.
val file = try { new File(i.url.toURI) } catch { case e: java.net.URISyntaxException => new File(i.url.getPath) }
val file = IO.toFile(i.url)
Resolver.file(i.id, file)(patterns)
case _ => Resolver.url(i.id, i.url)(patterns)
}