Skip to content

Commit

Permalink
Fix Linux and Windows builds for URL
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Jan 31, 2024
1 parent 97724c0 commit 4db1d84
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 4db1d84

Please sign in to comment.