OS-specific substring search in paths (fixes 'sbt dist' issue on Windows)

This commit is contained in:
Martin Krasser 2010-03-15 11:08:25 +01:00
parent 40997c4589
commit 8bfa3f4e69

View file

@ -358,7 +358,7 @@ class AkkaParent(info: ProjectInfo) extends DefaultProject(info) {
def deployTask(info: ProjectInfo, toDir: Path) = task {
val projectPath = info.projectPath.toString
val moduleName = projectPath.substring(projectPath.lastIndexOf('/') + 1, projectPath.length)
val moduleName = projectPath.substring(projectPath.lastIndexOf(System.getProperty("file.separator")) + 1, projectPath.length)
// FIXME need to find out a way to grab these paths from the sbt system
val JAR_FILE_NAME = moduleName + "_%s-%s.jar".format(defScalaVersion.value, version)
val JAR_FILE_PATH = projectPath + "/target/scala_%s/".format(defScalaVersion.value) + JAR_FILE_NAME