Skip to content

Commit ce9a9d7

Browse files
authored
on macOS, like on tvOS use the caches folder (#108)
on macOS, if the app is not sandboxed, the folder for events storage ends up in the user's `~/Documents/` directory, which potentially gets synced via iCloud Documents. Let's also use the caches directory on macOS.
1 parent f4e43e6 commit ce9a9d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Segment/Utilities/Storage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ extension Storage {
182182
}
183183

184184
private func eventStorageDirectory() -> URL {
185-
#if os(tvOS)
185+
#if os(tvOS) || os(macOS)
186186
let searchPathDirectory = FileManager.SearchPathDirectory.cachesDirectory
187187
#else
188188
let searchPathDirectory = FileManager.SearchPathDirectory.documentDirectory

0 commit comments

Comments
 (0)