From 97ed221d8beaa78d196236ba5f4f786761ca75e0 Mon Sep 17 00:00:00 2001 From: x1nixmzeng Date: Mon, 16 Feb 2015 23:04:10 +0000 Subject: [PATCH] Fixed writing data to the host device New paths can now be created if they do not exist - this allows content packages such as savedata to be written to disk --- src/xenia/kernel/fs/devices/host_path_device.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/fs/devices/host_path_device.cc b/src/xenia/kernel/fs/devices/host_path_device.cc index bec4fc39f..e0fba64ee 100644 --- a/src/xenia/kernel/fs/devices/host_path_device.cc +++ b/src/xenia/kernel/fs/devices/host_path_device.cc @@ -34,8 +34,11 @@ std::unique_ptr HostPathDevice::ResolvePath(const char* path) { auto full_path = poly::join_paths(local_path_, rel_path); full_path = poly::fix_path_separators(full_path); - if (!poly::fs::PathExists(full_path)) { - return nullptr; + // Only check the file exists when the device is read-only + if (read_only_) { + if (!poly::fs::PathExists(full_path)) { + return nullptr; + } } // TODO(benvanik): get file info