From feba4f03a29b15b03fbd0c20591ad493d34d869f Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 10 Jun 2015 19:09:33 -0500 Subject: [PATCH] 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;