From b372287ea2eca561ce337a7c2881f6c625a24ff4 Mon Sep 17 00:00:00 2001 From: kristian Date: Mon, 2 Sep 2013 14:10:58 +1000 Subject: [PATCH] Don't use canonical path for testing script dir to avoid failure when target directory is sym-linked to another location --- src/main/scala/com/typesafe/sbt/SbtStartScript.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/typesafe/sbt/SbtStartScript.scala b/src/main/scala/com/typesafe/sbt/SbtStartScript.scala index 4e4b223..62640d9 100644 --- a/src/main/scala/com/typesafe/sbt/SbtStartScript.scala +++ b/src/main/scala/com/typesafe/sbt/SbtStartScript.scala @@ -253,7 +253,7 @@ object SbtStartScript extends Plugin { // Generate shell script that calculates path to project directory from its own path. private def scriptRootDetect(baseDirectory: File, scriptFile: File, otherFile: Option[File]): String = { val baseDir = baseDirectory.getCanonicalPath - val scriptDir = scriptFile.getParentFile.getCanonicalPath + val scriptDir = scriptFile.getParentFile.getPath val pathFromScriptDirToBaseDir = if (scriptDir startsWith (baseDir + File.separator)) { val relativePath = scriptDir drop (baseDir.length + 1) var parts = relativePath split Pattern.quote(File.separator)