sys_fs: Implemented sys_fs_mount(prot=1) read-only mounting & fixed up some operation and permission checks

This commit is contained in:
brian218 2023-05-25 14:31:17 +08:00 committed by kd-11
parent 5e6aa45658
commit 6a570ae57e
6 changed files with 183 additions and 212 deletions

View file

@ -956,7 +956,7 @@ bool vfs::host::rename(const std::string& from, const std::string& to, const lv2
file.restore_data.seek_pos = file.file.pos();
if (!(file.mp->flags & (lv2_mp_flag::read_only + lv2_mp_flag::cache)) && file.flags & CELL_FS_O_ACCMODE)
if (!(file.mp.read_only && file.mp->flags & lv2_mp_flag::cache) && file.flags & CELL_FS_O_ACCMODE)
{
file.file.sync(); // For cellGameContentPermit atomicity
}