Skip to content

Commit ba396c0

Browse files
authored
(154227191) Consolidate URL compatibility checks (#1392)
1 parent eb084da commit ba396c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/FoundationEssentials/URL/URL_Swift.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ internal final class _SwiftURL: Sendable, Hashable, Equatable {
864864
/// `URL("/").deletingLastPathComponent == URL("/../")`
865865
/// `URL("/../").standardized == URL("")`
866866
#if FOUNDATION_FRAMEWORK
867-
if URL.compatibility4 && path == "/" {
867+
if URL.compatibility1 && path == "/" {
868868
components.percentEncodedPath = "/../"
869869
} else {
870870
components.percentEncodedPath = newPath
@@ -915,7 +915,7 @@ internal final class _SwiftURL: Sendable, Hashable, Equatable {
915915
/// `URL("/../").standardized == URL("")`
916916
#if FOUNDATION_FRAMEWORK
917917
guard isDecomposable else { return nil }
918-
let newPath = if URL.compatibility4 && _parseInfo.path == "/../" {
918+
let newPath = if URL.compatibility1 && _parseInfo.path == "/../" {
919919
""
920920
} else {
921921
String(_parseInfo.path).removingDotSegments

0 commit comments

Comments
 (0)