Skip to content

Commit 9896ba1

Browse files
leogdionclaude
andcommitted
Fix URL.temporaryDir and homeDirectory for Windows compatibility
- Change from URL(string:) to URL(fileURLWithPath:) for file system paths - URL(string:) fails on Windows paths with backslashes and drive letters (C:\) - URL(fileURLWithPath:) properly handles platform-specific file paths Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent db6d6b2 commit 9896ba1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Sources/BushelFoundationWax/Fake/URL.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ public import Foundation
3232
extension URL {
3333
// swiftlint:disable:next force_unwrapping
3434
public static let bushelWebSite = URL(string: "https://getbushel.app")!
35-
// swiftlint:disable:next force_unwrapping
36-
public static let homeDirectory = URL(string: NSHomeDirectory())!
37-
// swiftlint:disable:next force_unwrapping
38-
public static let temporaryDir = URL(string: NSTemporaryDirectory())!
35+
public static let homeDirectory = URL(fileURLWithPath: NSHomeDirectory())
36+
public static let temporaryDir = URL(fileURLWithPath: NSTemporaryDirectory())
3937
}

0 commit comments

Comments
 (0)