sys_fs_fsync fix

This commit is contained in:
Nekotekina
2017-05-01 21:34:50 +03:00
parent e2478902c9
commit e8d76ede14
+2 -2
View File
@@ -1020,7 +1020,7 @@ error_code sys_fs_fdatasync(u32 fd)
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
if (!file)
if (!file || !(file->flags & CELL_FS_O_ACCMODE))
{
return CELL_EBADF;
}
@@ -1036,7 +1036,7 @@ error_code sys_fs_fsync(u32 fd)
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
if (!file)
if (!file || !(file->flags & CELL_FS_O_ACCMODE))
{
return CELL_EBADF;
}