From bc0fb190059567a41d1bb354664ddd08bd015bad Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 10 Jun 2015 19:08:58 -0500 Subject: [PATCH 1/2] Swap main device to harddisk0 --- src/xenia/kernel/fs/filesystem.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xenia/kernel/fs/filesystem.cc b/src/xenia/kernel/fs/filesystem.cc index 970caef1b..e83d9ba32 100644 --- a/src/xenia/kernel/fs/filesystem.cc +++ b/src/xenia/kernel/fs/filesystem.cc @@ -76,15 +76,15 @@ int FileSystem::InitializeFromPath(fs::FileSystemType type, // Register the local directory in the virtual filesystem. int result_code = RegisterHostPathDevice( - "\\Device\\Harddisk1\\Partition0", parent_path, true); + "\\Device\\Harddisk0\\Partition0", parent_path, true); if (result_code) { XELOGE("Unable to mount local directory"); return result_code; } // Create symlinks to the device. - CreateSymbolicLink("game:", "\\Device\\Harddisk1\\Partition0"); - CreateSymbolicLink("d:", "\\Device\\Harddisk1\\Partition0"); + CreateSymbolicLink("game:", "\\Device\\Harddisk0\\Partition0"); + CreateSymbolicLink("d:", "\\Device\\Harddisk0\\Partition0"); break; } case FileSystemType::DISC_IMAGE: { From feba4f03a29b15b03fbd0c20591ad493d34d869f Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 10 Jun 2015 19:09:33 -0500 Subject: [PATCH 2/2] ResolvePath check for fully qualified paths --- src/xenia/kernel/fs/filesystem.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xenia/kernel/fs/filesystem.cc b/src/xenia/kernel/fs/filesystem.cc index e83d9ba32..d45847325 100644 --- a/src/xenia/kernel/fs/filesystem.cc +++ b/src/xenia/kernel/fs/filesystem.cc @@ -165,6 +165,16 @@ std::unique_ptr FileSystem::ResolvePath(const std::string& path) { } } + // Not to fret, check to see if the path is fully qualified. + if (device_path.empty()) { + for (auto& device : devices_) { + if (xe::find_first_of_case(normalized_path, device->path()) == 0) { + device_path = device->path(); + relative_path = normalized_path.substr(device_path.size()); + } + } + } + if (device_path.empty()) { XELOGE("ResolvePath(%s) failed - no root found", path.c_str()); return nullptr;