Add support for direct path when cloning VM

This commit is contained in:
Jakub Klapacz
2025-05-14 17:20:56 -05:00
parent 22351f6917
commit 8cd5fc6e45

View File

@@ -87,7 +87,14 @@ final class Home {
let baseDir = Path(cleanPath)
return VMDirectory(baseDir.directory(name))
}
// Check if storage is a direct path
if let storage = storage, (storage.contains("/") || storage.contains("\\")) {
let cleanPath = storage.hasSuffix("/") ? String(storage.dropLast()) : storage
let baseDir = Path(cleanPath)
return VMDirectory(baseDir.directory(name))
}
let location: VMLocation
if let storage = storage {