Skip to content
This repository
Browse code

Merge pull request #40 from eed3si9n/resolvepathsfix10

Full path in launch config results to "URI is not hierarchical" error on Windows (0.10)
  • Loading branch information...
commit c7165c9b79e642440c43ca4cf0ec6dfa6ab44674 2 parents b7c20a1 + 79de239
Mark Harrah authored

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. +7 5 launch/Find.scala
12 launch/Find.scala
@@ -50,9 +50,11 @@ object ResolvePaths
50 50 def apply(config: LaunchConfiguration, baseDirectory: File): LaunchConfiguration =
51 51 config.map(f => apply(baseDirectory, f))
52 52 def apply(baseDirectory: File, f: File): File =
53   - {
54   - assert(baseDirectory.isDirectory) // if base directory is not a directory, URI.resolve will not work properly
55   - val uri = new URI(null, null, f.getPath, null)
56   - new File(baseDirectory.toURI.resolve(uri))
57   - }
  53 + if (f.isAbsolute) f
  54 + else
  55 + {
  56 + assert(baseDirectory.isDirectory) // if base directory is not a directory, URI.resolve will not work properly
  57 + val uri = new URI(null, null, f.getPath, null)
  58 + new File(baseDirectory.toURI.resolve(uri))
  59 + }
58 60 }

0 comments on commit c7165c9

Please sign in to comment.
Something went wrong with that request. Please try again.