Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 10ebb3e

Browse files
committed
Don't attempt to read directories with a .swift path extension as files
Fixes #13
1 parent 1d51e24 commit 10ebb3e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/swift-doc/main.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ command(
2828
let directory = URL(fileURLWithPath: path)
2929
guard let directoryEnumerator = fileManager.enumerator(at: directory, includingPropertiesForKeys: nil) else { continue }
3030
for case let url as URL in directoryEnumerator {
31+
guard !url.hasDirectoryPath else { continue }
3132
guard url.pathExtension == "swift" else { continue }
3233
sourceFiles.append(try SourceFile(file: url, relativeTo: directory))
3334
}

0 commit comments

Comments
 (0)