summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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