cellFsOpen flag fix

This commit is contained in:
eladash
2018-11-23 18:38:24 +02:00
committed by Ivan
parent 0526bfd7de
commit 4baa159523
+5 -12
View File
@@ -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)
@@ -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;