Open disks as read-write

This commit is contained in:
Ry 2022-09-17 00:10:44 -07:00
parent 9059889d3d
commit bf48300f2f
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ impl DiskController {
.set_title(&format!("Select a file to insert"))
.pick_file();
match path {
Some(path) => Some(File::open(path).expect("failed to open disk image")),
Some(path) => Some(File::options().read(true).write(true).open(path).expect("failed to open disk image")),
None => None,
}
}

View File

@ -106,7 +106,7 @@ fn main() {
let mut args_iter = args.iter();
args_iter.next();
for (i, arg) in args_iter.enumerate() {
bus.disk_controller.insert(File::open(&arg).expect("failed to load provided disk image"), i as u8);
bus.disk_controller.insert(File::options().read(true).write(true).open(&arg).expect("failed to load provided disk image"), i as u8);
}
}