From 79de239ce879cc89845668c5a257bf3744329f08 Mon Sep 17 00:00:00 2001 From: "e.e d3si9n" Date: Sun, 5 Jun 2011 17:39:27 -0400 Subject: [PATCH] fix path resolution on Windows --- launch/Find.scala | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/launch/Find.scala b/launch/Find.scala index 1145b5617..8539b58ec 100644 --- a/launch/Find.scala +++ b/launch/Find.scala @@ -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)) + } } \ No newline at end of file