Skip to content

Commit

Permalink
add conditional check for windows os in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjcharles committed Jan 25, 2024
1 parent 51f56b9 commit 8dfe170
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Segment/Utilities/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ extension Storage {
private func eventStorageDirectory() -> URL {
#if os(tvOS) || os(macOS)
let searchPathDirectory = FileManager.SearchPathDirectory.cachesDirectory
#elseif os(Windows)
// `itemReplacementDirectory` is used to create a temp directory
let searchPathDirectory = FileManager.SearchPathDirectory.itemReplacementDirectory
#else
let searchPathDirectory = FileManager.SearchPathDirectory.documentDirectory
#endif
Expand Down

0 comments on commit 8dfe170

Please sign in to comment.