mirror of
https://github.com/trycua/computer.git
synced 2026-02-20 13:29:35 -06:00
Merge pull request #177 from jklapacz/main
Add support for direct path when cloning VM
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user