# bugfix: was triggering write-to-mod feature for all file writes due to incorrect flag comparison (2 bits must both be set)
This was SVN commit r3824.
This commit is contained in:
parent
641e55fefd
commit
dfed3ac186
@ -289,7 +289,11 @@ static LibError VFile_reload(VFile* vf, const char* V_path, Handle)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flags & FILE_WRITE_TO_MOD)
|
// careful! FILE_WRITE_TO_MOD consists of 2 bits; they must both be
|
||||||
|
// set (one of them is FILE_WRITE, which can be set independently).
|
||||||
|
// this is a bit ugly but better than requiring users to write
|
||||||
|
// FILE_WRITE|FILE_WRITE_TO_MOD.
|
||||||
|
if((flags & FILE_WRITE_TO_MOD) == FILE_WRITE_TO_MOD)
|
||||||
RETURN_ERR(set_mount_to_mod_target(tf));
|
RETURN_ERR(set_mount_to_mod_target(tf));
|
||||||
|
|
||||||
RETURN_ERR(xfile_open(V_path, flags, tf, &vf->f));
|
RETURN_ERR(xfile_open(V_path, flags, tf, &vf->f));
|
||||||
|
Loading…
Reference in New Issue
Block a user