From a702893fd1e1e59b5bfc770c5088120e8c3ece56 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 7 Jul 2025 21:49:48 +1200 Subject: Sandbox the file device Unless the --trust-files switch is used, the file device will be sandboxed to a program-specific config folder placed according to the conventions of the operating system. --- src/emulators/graphical_emulator.rs | 2 +- src/emulators/headless_emulator.rs | 2 +- src/emulators/mod.rs | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/emulators') diff --git a/src/emulators/graphical_emulator.rs b/src/emulators/graphical_emulator.rs index 2680d3f..03e3057 100644 --- a/src/emulators/graphical_emulator.rs +++ b/src/emulators/graphical_emulator.rs @@ -112,7 +112,7 @@ impl GraphicalDeviceBus { input: InputDevice::new(), screen: ScreenDevice::new(&config), stream: StreamDevice::new(&config), - file: FileDevice::new(), + file: FileDevice::new(&config), wake_queue: WakeQueue::new(), } } diff --git a/src/emulators/headless_emulator.rs b/src/emulators/headless_emulator.rs index cac58cf..770bae3 100644 --- a/src/emulators/headless_emulator.rs +++ b/src/emulators/headless_emulator.rs @@ -70,7 +70,7 @@ impl HeadlessDeviceBus { math: MathDevice::new(), clock: ClockDevice::new(), stream: StreamDevice::new(&config), - file: FileDevice::new(), + file: FileDevice::new(&config), wake_queue: WakeQueue::new(), } } diff --git a/src/emulators/mod.rs b/src/emulators/mod.rs index 8f04e4d..d4a58f9 100644 --- a/src/emulators/mod.rs +++ b/src/emulators/mod.rs @@ -15,7 +15,10 @@ pub struct EmulatorConfig { pub show_cursor: bool, pub decode_stdin: bool, pub encode_stdout: bool, + pub trust_files: bool, pub symbols_path: Option, + pub name: Option, + pub identifier: Option, pub title: String, pub icon: Option, } -- cgit v1.2.3-70-g09d2