Skip to content

Commit 5b680b9

Browse files
authored
Merge pull request #2301 from compnerd/_CFXDGCreateDataHomePath
2 parents 21bef12 + 0bf5123 commit 5b680b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/HTTPCookieStorage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ open class HTTPCookieStorage: NSObject {
8080
if let range = bundleName.range(of: ".", options: .backwards, range: nil, locale: nil) {
8181
bundleName = String(bundleName[..<range.lowerBound])
8282
}
83-
let cookieFolderPath = (((_CFXDGCreateDataHomePath() as! AnyObject) as! NSString) as String) + "/" + bundleName
83+
let cookieFolderPath = URL(fileURLWithPath: bundleName, relativeTo: FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]).path
8484
cookieFilePath = filePath(path: cookieFolderPath, fileName: "/.cookies." + cookieStorageName, bundleName: bundleName)
8585
loadPersistedCookies()
8686
}

0 commit comments

Comments
 (0)