Permalink
Browse files

Shorter, simpler, cleaner

  • Loading branch information...
1 parent 2b6f8e2 commit 18414ee900b6d13596820c4b4dd6471732922884 @dhobi committed Dec 20, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 sbt-idea-core/src/main/scala/IdeaModuleDescriptor.scala
@@ -115,11 +115,7 @@ class IdeaModuleDescriptor(val project: BasicDependencyProject, val log: Logger)
val allJars = projectJars(project)
// exclude dependencies already declared in module dependencies within the same scope
def nameWithScope(f: File): String = {
- val separator = File.separator match {
- case """\""" => "\\\\"
- case _ => File.separator
- }
- f.getAbsolutePath.split(separator).reverse.take(2).reverse.toList.mkString(separator)
+ f.getAbsolutePath.split(File.separatorChar).reverse.take(2).reverse.toList.mkString(File.separator)
}
val alreadyDeclared = dependencyProjects.flatMap{
case p: BasicDependencyProject => List(projectJars(p).getFiles.map(f => (nameWithScope(f), f.length)))

0 comments on commit 18414ee

Please sign in to comment.