From 4db1d8438788adfcedc2d50295d9eb6bca77e96c Mon Sep 17 00:00:00 2001 From: Leif Date: Tue, 30 Jan 2024 18:19:28 -0700 Subject: [PATCH] Fix Linux and Windows builds for URL --- .../Application/Types/Helper/FileManager+AppState.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/AppState/Application/Types/Helper/FileManager+AppState.swift b/Sources/AppState/Application/Types/Helper/FileManager+AppState.swift index 03b3b98..9025ca8 100644 --- a/Sources/AppState/Application/Types/Helper/FileManager+AppState.swift +++ b/Sources/AppState/Application/Types/Helper/FileManager+AppState.swift @@ -160,10 +160,14 @@ extension FileManager { } func url(filePath: String) -> URL { + #if !os(Linux) && !os(Windows) if #available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) { return URL(filePath: filePath) } else { return URL(fileURLWithPath: filePath) } + #else + return URL(fileURLWithPath: filePath) + #endif } }