diff --git a/src/main/scala/com/github/chencmd/datapacklinter/utils/Datapack.scala b/src/main/scala/com/github/chencmd/datapacklinter/utils/Datapack.scala index 702d483..40f718b 100644 --- a/src/main/scala/com/github/chencmd/datapacklinter/utils/Datapack.scala +++ b/src/main/scala/com/github/chencmd/datapacklinter/utils/Datapack.scala @@ -14,7 +14,7 @@ import typings.spgodingDatapackLanguageServer.libServicesCommonMod as DLSCommon object Datapack { def findDatapackRoots[F[_]: Async](dir: Path, maxDepth: Int): F[List[URI]] = for { - rootCandidatePaths <- FSAsync.foreachDirRec(dir, dir, _ => true, maxDepth)(_.abs.pure[F]) + rootCandidatePaths <- FSAsync.foreachDirRec(dir, dir, _ => true, maxDepth)(_.abs.pure[F]).map(x => dir :: x) rootPaths <- rootCandidatePaths.filterA { p => for { a <- FSAsync.pathAccessible(Path.join(p, "data"))