mirror of https://github.com/sbt/sbt.git
fix path resolution on Windows
This commit is contained in:
parent
b7c20a1149
commit
79de239ce8
|
|
@ -50,9 +50,11 @@ object ResolvePaths
|
|||
def apply(config: LaunchConfiguration, baseDirectory: File): LaunchConfiguration =
|
||||
config.map(f => apply(baseDirectory, f))
|
||||
def apply(baseDirectory: File, f: File): File =
|
||||
{
|
||||
assert(baseDirectory.isDirectory) // if base directory is not a directory, URI.resolve will not work properly
|
||||
val uri = new URI(null, null, f.getPath, null)
|
||||
new File(baseDirectory.toURI.resolve(uri))
|
||||
}
|
||||
if (f.isAbsolute) f
|
||||
else
|
||||
{
|
||||
assert(baseDirectory.isDirectory) // if base directory is not a directory, URI.resolve will not work properly
|
||||
val uri = new URI(null, null, f.getPath, null)
|
||||
new File(baseDirectory.toURI.resolve(uri))
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue