mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
sys_fs: always close locked file in sys_fs_close
Syscall returns EBUSY but succeeds nevertheless.
This commit is contained in:
parent
a005090d3d
commit
e2512e78b6
@ -515,24 +515,16 @@ error_code sys_fs_close(ppu_thread& ppu, u32 fd)
|
||||
|
||||
sys_fs.trace("sys_fs_close(fd=%d)", fd);
|
||||
|
||||
const auto file = idm::withdraw<lv2_fs_object, lv2_file>(fd, [](lv2_file& file) -> CellError
|
||||
{
|
||||
if (file.lock == 1)
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
||||
return {};
|
||||
});
|
||||
const auto file = idm::withdraw<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
return CELL_EBADF;
|
||||
}
|
||||
|
||||
if (file.ret)
|
||||
if (file->lock == 1)
|
||||
{
|
||||
return file.ret;
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user