Allow directories for external files

This commit is contained in:
Christoph Hagen
2022-09-05 12:59:32 +02:00
parent 1c13f4fc60
commit a69da0fa35
2 changed files with 42 additions and 3 deletions

View File

@ -372,7 +372,10 @@ extension Element {
}
static func rootPaths(for input: Set<String>?, path: String) -> Set<String> {
input.unwrapped { Set($0.map { relativeToRoot(filePath: $0, folder: path) }) } ?? []
guard let input = input else {
return []
}
return Set(input.map { relativeToRoot(filePath: $0, folder: path) })
}
func relativePathToFileWithPath(_ filePath: String) -> String {