Skip to content

Commit 27476f9

Browse files
authored
(149316573) Remove URL workaround for Linux crash once SCL-F is rebuilt (#1252)
1 parent a842db4 commit 27476f9

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Sources/FoundationEssentials/URL/URL.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -690,18 +690,6 @@ public struct URL: Equatable, Sendable, Hashable {
690690
///
691691
/// Returns `nil` if a `URL` cannot be formed with the string (for example, if the string contains characters that are illegal in a URL, or is an empty string).
692692
public init?(string: __shared String, relativeTo url: __shared URL?) {
693-
#if os(Linux)
694-
// Workaround for a Linux-only crash where swift-corelibs-foundation's
695-
// NSURL.baseURL.getter returns a value of 0x1 when bridging to URL.
696-
// Crash doesn't occur when swift-corelibs-foundation is rebuilt with
697-
// the new swift-foundation URL code, so this is temporary to get
698-
// swift-foundation CI to pass.
699-
if unsafeBitCast(url, to: (UnsafeRawPointer, UnsafeRawPointer).self) == (UnsafeRawPointer(bitPattern: 0x1), UnsafeRawPointer(bitPattern: 0x0)) {
700-
guard let inner = URL._type.init(string: string, relativeTo: nil) else { return nil }
701-
_url = inner.convertingFileReference()
702-
return
703-
}
704-
#endif
705693
guard let inner = URL._type.init(string: string, relativeTo: url) else { return nil }
706694
_url = inner.convertingFileReference()
707695
}

0 commit comments

Comments
 (0)