=sbt Make use of File.separatorChar to avoid exception. (#80)

This commit is contained in:
kerr 2022-12-30 05:37:51 +08:00 committed by GitHub
parent 573cdf4fa6
commit f26dfd92a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ object PekkoValidatePullRequest extends AutoPlugin {
loadedBuild.value.allProjectRefs.collect {
case (_, project) if !ignoredProjects.contains(project.id) =>
val directory = project.base.getPath.split("/").last
val directory = project.base.getPath.split(java.io.File.separatorChar).last
PathGlobFilter(s"$directory/**")
}.fold(new FileFilter { // TODO: Replace with FileFilter.nothing when https://github.com/sbt/io/pull/340 gets released
override def accept(pathname: File): Boolean = false