mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 00:29:09 +00:00
fs: Actually functional linux case insensitive search
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/singleton.h"
|
||||
#include "core/file_sys/fs.h"
|
||||
#include "core/libraries/libc/libc_stdio.h"
|
||||
@@ -10,11 +10,12 @@ namespace Libraries::LibC {
|
||||
|
||||
std::FILE* PS4_SYSV_ABI ps4_fopen(const char* filename, const char* mode) {
|
||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
FILE* f = std::fopen(mnt->GetHostFile(filename).c_str(), mode);
|
||||
const auto host_path = mnt->GetHostPath(filename);
|
||||
FILE* f = std::fopen(host_path.c_str(), mode);
|
||||
if (f != nullptr) {
|
||||
LOG_INFO(Lib_LibC, "fopen = {}", mnt->GetHostFile(filename).c_str());
|
||||
LOG_INFO(Lib_LibC, "fopen = {}", host_path.native());
|
||||
} else {
|
||||
LOG_INFO(Lib_LibC, "fopen can't open = {}", mnt->GetHostFile(filename).c_str());
|
||||
LOG_INFO(Lib_LibC, "fopen can't open = {}", host_path.native());
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user