mirror of https://github.com/sbt/sbt.git
Merge pull request #40 from eed3si9n/resolvepathsfix10
Full path in launch config results to "URI is not hierarchical" error on Windows (0.10)
This commit is contained in:
commit
c7165c9b79
|
|
@ -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