summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordcaoyuan <dcaoyuan@epfl.ch>2009-11-18 14:46:01 +0000
committerdcaoyuan <dcaoyuan@epfl.ch>2009-11-18 14:46:01 +0000
commit536955e1afd68ac6f99f0347fa14a58ab47cb958 (patch)
treeffe2b9994f5125927ad178dc1f97530a2f1555a6
parent06713afedffebde4cbb50de882763c95889cdcdf (diff)
downloadscala-536955e1afd68ac6f99f0347fa14a58ab47cb958.tar.gz
scala-536955e1afd68ac6f99f0347fa14a58ab47cb958.tar.bz2
scala-536955e1afd68ac6f99f0347fa14a58ab47cb958.zip
Fixed #2645
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala4
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 f137a8eb4c..ffe3b861da 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 = Path("")
+ val rootPath = depFilePath.normalize.parent.get.normalize
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 = Path("").normalize
+ val rootPath = depFilePath.normalize.parent.get.normalize
def fromFile(file: AbstractFile): String =
rootPath.relativize(Path(file.file).normalize).path