Make sure VM directory exists before moving (#111)

This commit is contained in:
Fedor Korotkov
2022-06-03 23:22:11 +03:00
committed by GitHub
parent 63329ef363
commit c14b46adc3
+1
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)
}