Skip to content

Commit

Permalink
Fix URL extensions for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
florianpircher committed Aug 24, 2024
1 parent 78649b7 commit 63e4b20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import Foundation

/// Initializers for `URL` from `AbsoluteFilePath`.
public extension URL {
@_disfavoredOverload
init(_ filePath: AbsoluteFilePath) {
#if canImport(Darwin)
if #available(macOS 13, *) {
Expand All @@ -41,10 +40,12 @@ public extension URL {
#endif
}

#if canImport(Darwin)
@available(macOS 13, *)
init(_ filePath: AbsoluteFilePath, directoryHint: URL.DirectoryHint = .inferFromPath) {
init(_ filePath: AbsoluteFilePath, directoryHint: URL.DirectoryHint) {
self.init(filePath: filePath.storage, directoryHint: directoryHint)!
}
#endif

init(_ filePath: AbsoluteFilePath, isDirectory: Bool) {
#if canImport(Darwin)
Expand Down

0 comments on commit 63e4b20

Please sign in to comment.