Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

fix: fresh bottles failed to create — cwd pointed at drive_c before wineboot creates it

Gauthier Piarrette538173a3c0da
diff --git a/Sources/HighballKit/WineRunner.swift b/Sources/HighballKit/WineRunner.swift
index ded35df..2de99d6 100644
--- a/Sources/HighballKit/WineRunner.swift
+++ b/Sources/HighballKit/WineRunner.swift
@@ -42,7 +42,8 @@ public struct WineRunner: Sendable {
process.executableURL = engine.wineBinary
process.arguments = args
process.environment = ProcessInfo.processInfo.environment.merging(env) { $1 }
- process.currentDirectoryURL = bottle.driveC
+ // drive_c only exists after the first wineboot — fall back to the bottle root on fresh prefixes.
+ process.currentDirectoryURL = FileManager.default.fileExists(atPath: bottle.driveC.path) ? bottle.driveC : bottle.url
let pipe = Pipe()
process.standardOutput = pipe
process.standardError = pipe