Skip to content

Commit

Permalink
Merge pull request #338 from eed3si9n/bport/unc
Browse files Browse the repository at this point in the history
[1.3.x] support UNC path
  • Loading branch information
eed3si9n committed Jun 26, 2020
2 parents 6939573 + 427e8fc commit 50eb67e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ before_install:
- source "$HOME/.sdkman/bin/sdkman-init.sh"

install:
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1)
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1) || true
- bin/fixpreloaded.sh
- unset JAVA_HOME
- java -Xmx32m -version
# detect sbt version from project/build.properties
- export TRAVIS_SBT=$(grep sbt.version= project/build.properties | sed -e 's/sbt.version=//g' ) && echo "sbt $TRAVIS_SBT"
# - export TRAVIS_SBT=1.3.3
- sdk install sbt $TRAVIS_SBT
- sdk install sbt $TRAVIS_SBT || true
# override Travis CI's SBT_OPTS
- unset SBT_OPTS
- export JAVA_OPTS="-Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M"
Expand Down
8 changes: 6 additions & 2 deletions core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala
Original file line number Diff line number Diff line change
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 50eb67e

Please sign in to comment.