Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cellFsOpen flag fix #5365

Merged
merged 2 commits into from
Nov 23, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions rpcs3/Emu/Cell/lv2/sys_fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ error_code sys_fs_open(vm::cptr<char> path, s32 flags, vm::ptr<u32> fd, s32 mode
if (flags & CELL_FS_O_CREAT)
{
open_mode += fs::create;

if (flags & CELL_FS_O_EXCL)
{
open_mode += fs::excl;
}
}

if (flags & CELL_FS_O_TRUNC)
Expand All @@ -242,18 +247,6 @@ error_code sys_fs_open(vm::cptr<char> path, s32 flags, vm::ptr<u32> fd, s32 mode
open_mode += fs::append;
}

if (flags & CELL_FS_O_EXCL)
{
if (flags & CELL_FS_O_CREAT)
{
open_mode += fs::excl;
}
else
{
open_mode = {}; // error
}
}

if (flags & CELL_FS_O_MSELF)
{
open_mode = fs::read;
Expand Down