mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 23:42:43 +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);
|
auto* file = h->GetFile(host_path);
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
// Cannot unlink an unopened file
|
// File to unlink hasn't been opened, manually open and unlink it.
|
||||||
return ORBIS_OK;
|
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);
|
LOG_INFO(Kernel_Fs, "Unlinked {}", path);
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user