Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Sources/SQLiteData/CloudKit/Internal/Metadatabase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
open "\(url.path(percentEncoded: false))"
"""
)
try FileManager.default.createDirectory(
at: .applicationSupportDirectory,
withIntermediateDirectories: true
)

#if !os(tvOS)
try FileManager.default.createDirectory(
at: .applicationSupportDirectory,
withIntermediateDirectories: true
)
#endif
@Dependency(\.context) var context
guard !url.isInMemory || context != .live
else {
Expand Down
10 changes: 6 additions & 4 deletions Sources/SQLiteData/CloudKit/SyncEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2239,10 +2239,12 @@
containerIdentifier: containerIdentifier
)
let path = url.isInMemory ? url.absoluteString : url.path(percentEncoded: false)
try FileManager.default.createDirectory(
at: .applicationSupportDirectory,
withIntermediateDirectories: true
)
#if !os(tvOS)
try FileManager.default.createDirectory(
at: .applicationSupportDirectory,
withIntermediateDirectories: true
)
#endif
let database: any DatabaseWriter =
url.isInMemory
? try DatabaseQueue(path: path)
Expand Down