mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +00:00
Remove Bloodborne hack
Games should be able to unlink files that aren't opened file descriptors. As far as I've tested, this doesn't break Bloodborne.
This commit is contained in:
parent
f9558ec1b6
commit
4a4536724f
@ -948,12 +948,13 @@ s32 PS4_SYSV_ABI posix_unlink(const char* path) {
|
||||
|
||||
auto* file = h->GetFile(host_path);
|
||||
if (file == nullptr) {
|
||||
// Cannot unlink an unopened file
|
||||
return ORBIS_OK;
|
||||
// File to unlink hasn't been opened, manually open and unlink it.
|
||||
Common::FS::IOFile file(host_path, Common::FS::FileAccessMode::ReadWrite);
|
||||
file.Unlink();
|
||||
} else {
|
||||
file->f.Unlink();
|
||||
}
|
||||
|
||||
file->f.Unlink();
|
||||
|
||||
LOG_INFO(Kernel_Fs, "Unlinked {}", path);
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user