[Try 5] msvcrt: Set permissions of file in sopen
dmitry at codeweavers.com
Wed Oct 22 23:22:08 CDT 2008
"Ivan Peevski" <cyberhorse at gmail.com> wrote:
> the pmode flag test should be:
> if it has the IREAD but not the IWRITE flag (read only)
> does that make sense? Is it doing what I think it is?
It should be:
if ((pmode & MSVCRT__S_IREAD) && !(pmode & MSVCRT__S_IWRITE))
IMO it would be more convenient to use switch, that would cover
all the possible cases:
switch (pmode & (MSVCRT__S_IREAD | MSVCRT__S_IWRITE))
case MSVCRT__S_IREAD | MSVCRT__S_IWRITE:
Of course a test is needed to prove that.
More information about the wine-devel