diff options
author | dcaoyuan <dcaoyuan@epfl.ch> | 2009-11-19 08:24:37 +0000 |
---|---|---|
committer | dcaoyuan <dcaoyuan@epfl.ch> | 2009-11-19 08:24:37 +0000 |
commit | 055190a38ba1496821b2b67c368c97e33573883a (patch) | |
tree | 1ea67b5250727b12617a5977b5cfe88267e99576 /src/compiler/scala/tools/nsc/Global.scala | |
parent | 6f4e82da32eec2d1be861c8e4ca442d11b9a86cf (diff) | |
download | scala-055190a38ba1496821b2b67c368c97e33573883a.tar.gz scala-055190a38ba1496821b2b67c368c97e33573883a.tar.bz2 scala-055190a38ba1496821b2b67c368c97e33573883a.zip |
Path.parent now returns Path instead of Option[...
Path.parent now returns Path instead of Option[Path], and it prefers
relative path.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index ffe3b861da..09d900ce78 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -230,7 +230,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable val depFilePath = Path(x) if (depFilePath.exists) { /** The directory where file lookup should start */ - val rootPath = depFilePath.normalize.parent.get.normalize + val rootPath = depFilePath.parent def toFile(path: String) = AbstractFile.getFile(rootPath resolve Path(path)) dependencyAnalysis.loadFrom(AbstractFile.getFile(depFilePath), toFile) } @@ -833,7 +833,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable dependencyAnalysis.dependenciesFile = AbstractFile.getFile(depFilePath.createFile()) /** The directory where file lookup should start */ - val rootPath = depFilePath.normalize.parent.get.normalize + val rootPath = depFilePath.parent.normalize def fromFile(file: AbstractFile): String = rootPath.relativize(Path(file.file).normalize).path |