Skip to content

Commit 541cc19

Browse files
committed
Avoid jextracting +SwiftJava files
1 parent 2268bb6 commit 541cc19

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Sources/JExtractSwiftLib/Swift2Java.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,17 @@ public struct SwiftToJava {
124124
}
125125

126126
func canExtract(from file: URL) -> Bool {
127-
file.lastPathComponent.hasSuffix(".swift") ||
128-
file.lastPathComponent.hasSuffix(".swiftinterface")
127+
guard file.lastPathComponent.hasSuffix(".swift") else {
128+
return false
129+
}
130+
guard file.lastPathComponent.hasSuffix(".swiftinterface") else {
131+
return false
132+
}
133+
guard !file.lastPathComponent.hasSuffix("+SwiftJava.swift") else {
134+
return false
135+
}
136+
137+
return true
129138
}
130139

131140
}

0 commit comments

Comments
 (0)