We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
swoval
1 parent ecf3779 commit e1fdcd3Copy full SHA for e1fdcd3
modules/build/src/main/scala/scala/build/Build.scala
@@ -705,8 +705,9 @@ object Build {
705
val p = os.Path(event.getTypedPath.getPath.toAbsolutePath)
706
val relPath = p.relativeTo(d.path)
707
val isHidden = relPath.segments.exists(_.startsWith("."))
708
- def isScalaFile = relPath.last.endsWith(".sc") || relPath.last.endsWith(".scala")
709
- def isJavaFile = relPath.last.endsWith(".java")
+ val pathLast = relPath.lastOpt.orElse(p.lastOpt).getOrElse("")
+ def isScalaFile = pathLast.endsWith(".sc") || pathLast.endsWith(".scala")
710
+ def isJavaFile = pathLast.endsWith(".java")
711
!isHidden && (isScalaFile || isJavaFile)
712
case _ => _ => true
713
}
0 commit comments