1 parent 61bd6be commit 9e17985Copy full SHA for 9e17985
1 file changed
Sources/DependencyCalculator/DependencyGraph.swift
@@ -458,8 +458,16 @@ extension WorkspaceInfo {
458
let recursiveChildrenFilePaths = ((try? folderPath.recursiveChildren()) ?? [])
459
.filter { $0.isFile }
460
461
- paths.append(contentsOf: recursiveChildrenFilePaths.filter { !membershipExceptionPaths.contains($0) })
+ paths.append(contentsOf: recursiveChildrenFilePaths.filter { filePath in
462
+ !membershipExceptionPaths.contains { filePath.isDescendantOrSelf(of: $0) }
463
+ })
464
}
465
return paths
466
467
468
+
469
+private extension Path {
470
+ func isDescendantOrSelf(of path: Path) -> Bool {
471
+ self == path || string.hasPrefix(path.string + Path.separator)
472
+ }
473
+}
0 commit comments