Skip to content

Commit 09d9e34

Browse files
authored
(138788176) Add flag for CFURLs originating from Swift (#1026)
1 parent ab00100 commit 09d9e34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/FoundationEssentials/URL/URL.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,13 +652,15 @@ public struct URL: Equatable, Sendable, Hashable {
652652
static let isDecomposable = _CFURLFlags(rawValue: 0x00004000)
653653
static let posixAndURLPathsMatch = _CFURLFlags(rawValue: 0x00008000)
654654
static let originalAndURLStringsMatch = _CFURLFlags(rawValue: 0x00010000)
655+
static let originatedFromSwift = _CFURLFlags(rawValue: 0x00020000)
655656
}
656657

657658
private static func _cfURL(from parseInfo: URLParseInfo, baseURL: CFURL?) -> CFURL {
658659
let string = parseInfo.urlString
659660
var ranges = [CFRange]()
660661
var flags: _CFURLFlags = [
661662
.originalAndURLStringsMatch,
663+
.originatedFromSwift,
662664
]
663665

664666
// CFURL considers a URL decomposable if it does not have a scheme

0 commit comments

Comments
 (0)