VirtualBox

Changeset 3387 in kBuild


Ignore:
Timestamp:
Jun 26, 2020 4:51:19 PM (5 years ago)
Author:
bird
Message:

mscfakes.c: Don't pass zero to SetFileAttributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mscfakes.c

    r3219 r3387  
    207207         */
    208208        if (mode & _S_IWRITE)
     209        {
    209210            fAttr &= ~FILE_ATTRIBUTE_READONLY;
     211            if (fAttr == 0)
     212                fAttr = FILE_ATTRIBUTE_NORMAL;
     213        }
    210214        else
     215        {
     216            fAttr &= ~FILE_ATTRIBUTE_NORMAL;
    211217            fAttr |= FILE_ATTRIBUTE_READONLY;
     218        }
    212219        if (!SetFileAttributes(pszPath, fAttr))
    213220            rc = birdSetErrno(GetLastError());
     
    252259         */
    253260        if (mode & _S_IWRITE)
     261        {
    254262            fAttr &= ~FILE_ATTRIBUTE_READONLY;
     263            if (fAttr == 0)
     264                fAttr = FILE_ATTRIBUTE_NORMAL;
     265        }
    255266        else
     267        {
     268            fAttr &= ~FILE_ATTRIBUTE_NORMAL;
    256269            fAttr |= FILE_ATTRIBUTE_READONLY;
     270        }
    257271        if (!SetFileAttributes(pszPath, fAttr))
    258272            rc = birdSetErrno(GetLastError());
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette