Skip to content

Commit

Permalink
Merge pull request #337 from eed3si9n/wip/unc
Browse files Browse the repository at this point in the history
support UNC path
  • Loading branch information
eed3si9n committed Jun 26, 2020
2 parents 68008ee + 5f4cbad commit 50ca390
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala
Expand Up @@ -4,7 +4,7 @@
package sbt.librarymanagement

import java.io.{ IOException, File }
import java.net.URL
import java.net.{ URI, URL }
import scala.xml.XML
import org.xml.sax.SAXParseException
import sbt.util.Logger
Expand Down Expand Up @@ -304,9 +304,13 @@ private[librarymanagement] abstract class ResolverFunctions {

/** Constructs a file resolver with the given name and base directory. */
def apply(name: String, baseDirectory: File)(implicit basePatterns: Patterns): FileRepository =
baseRepository(new File(baseDirectory.toURI.normalize).getAbsolutePath)(
baseRepository(
new File(toUri(baseDirectory).normalize.getSchemeSpecificPart).getAbsolutePath
)(
FileRepository(name, defaultFileConfiguration, _)
)

private def toUri(dir: File): URI = dir.toPath.toUri
}
object url {

Expand Down

0 comments on commit 50ca390

Please sign in to comment.