Files
VirtualBuddy/VirtualCore/Source/SavedSession/SavedSessionRestoration.swift
Guilherme Rambo 2a7cf4151b New virtual machine state preservation system (#780)
* Fix HostingWindowController allowing repeated requests to close while waiting for confirmation

* New virtual machine state preservation system with automatic save on close/quit and safe restoration

* Use visible directories for saved state storage for easier debugging in Finder

* Hide state restoration controls for unsupported Linux VMs

* Add app-level preference for what happens by default when attempting to close a running VM

* Use a custom sheet for VM close confirmation

* Improve VM close choice sheet

* Harden session storage against path traversal, fix race conditions in state coordination
2026-10-05 12:51:43 -03:00

12 lines
543 B
Swift

import Foundation
/// Everything that makes a restored virtual machine different from a regular one.
///
/// `@unchecked Sendable` because the configuration is a plain value that is never mutated after it is captured.
struct SavedSessionRestoration: @unchecked Sendable {
/// The configuration that was used to construct the virtual machine when its session was saved.
var configuration: VBMacConfiguration
/// The guest additions image that was attached when the session was saved, if any.
var guestAdditionsMediaURL: URL?
}