[Base/GPU] Fix some usage of xe::find_base_path.
This commit is contained in:
@@ -99,7 +99,7 @@ std::string CanonicalizePath(const std::string& original_path) {
|
|||||||
bool CreateParentFolder(const std::wstring& path) {
|
bool CreateParentFolder(const std::wstring& path) {
|
||||||
auto fixed_path = xe::fix_path_separators(path, xe::kWPathSeparator);
|
auto fixed_path = xe::fix_path_separators(path, xe::kWPathSeparator);
|
||||||
auto base_path = xe::find_base_path(fixed_path, xe::kWPathSeparator);
|
auto base_path = xe::find_base_path(fixed_path, xe::kWPathSeparator);
|
||||||
if (base_path.size() && !PathExists(base_path)) {
|
if (!base_path.empty() && !PathExists(base_path)) {
|
||||||
return CreateFolder(base_path);
|
return CreateFolder(base_path);
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ bool TraceWriter::Open(const std::wstring& path, uint32_t title_id) {
|
|||||||
|
|
||||||
auto canonical_path = xe::to_absolute_path(path);
|
auto canonical_path = xe::to_absolute_path(path);
|
||||||
auto base_path = xe::find_base_path(canonical_path);
|
auto base_path = xe::find_base_path(canonical_path);
|
||||||
xe::filesystem::CreateFolder(base_path);
|
if (!base_path.empty()) {
|
||||||
|
xe::filesystem::CreateFolder(base_path);
|
||||||
|
}
|
||||||
|
|
||||||
file_ = xe::filesystem::OpenFile(canonical_path, "wb");
|
file_ = xe::filesystem::OpenFile(canonical_path, "wb");
|
||||||
if (!file_) {
|
if (!file_) {
|
||||||
|
|||||||
Reference in New Issue
Block a user