Skip to content

Commit

Permalink
Fallback to FileManager.default.temporaryDirectory on older operating…
Browse files Browse the repository at this point in the history
… systems
  • Loading branch information
dfed committed Jan 15, 2024
1 parent 2890c81 commit e563726
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tests/SafeDIToolTests/SafeDIToolTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,11 @@ extension URL {
#if os(Linux)
FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
#else
URL.temporaryDirectory.appending(path: UUID().uuidString)
if #available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *) {
URL.temporaryDirectory.appending(path: UUID().uuidString)
} else {
FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
}
#endif
}
}

0 comments on commit e563726

Please sign in to comment.