From 87c7401067bc5e6da774b3c7252dec57746cb615 Mon Sep 17 00:00:00 2001 From: ChenCMD Date: Mon, 20 Nov 2023 21:21:56 +0900 Subject: [PATCH] :bug: Fix not detect data pack in repository root Fix #31 --- .../com/github/chencmd/datapacklinter/utils/Datapack.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"))