Make sure VM directory exists before moving (#111)

This commit is contained in:
Fedor Korotkov 2022-06-03 16:22:11 -04:00 committed by GitHub
parent 63329ef363
commit c14b46adc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ class VMStorageLocal {
}
func move(_ name: String, from: VMDirectory) throws {
_ = try FileManager.default.createDirectory(at: baseURL, withIntermediateDirectories: true)
_ = try FileManager.default.replaceItemAt(vmURL(name), withItemAt: from.baseURL)
}