Skip to content

Commit f670c42

Browse files
committed
SwiftLanguageServer: correct path detection on Windows
Correct the polarity of the check. The path being a UNC path or having a drive letter indicates that it *is* a path, as opposed to the inverted representation that was accidentally committed.
1 parent dbf0267 commit f670c42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ extension SwiftLanguageServer: SKDNotificationHandler {
11441144
// TODO: this is not completely portable, e.g. MacOS 9 HFS paths are
11451145
// unhandled.
11461146
#if os(Windows)
1147-
let isPath: Bool = !name.withCString(encodedAs: UTF16.self) {
1147+
let isPath: Bool = name.withCString(encodedAs: UTF16.self) {
11481148
PathIsUNCW($0) || (0...25) ~= PathGetDriveNumberW($0)
11491149
}
11501150
#else

0 commit comments

Comments
 (0)