Changeset 3812


Ignore:
Timestamp:
Feb 17, 2014, 2:25:58 PM (11 years ago)
Author:
bird
Message:

b_fsNativeFileStat.c: Don't check rc for FILE_READONLY but rather fAttributes. Fixed typo. Fixes #213

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/src/lib/sys/b_fsNativeFileStat.c

    r3063 r3812  
    180180
    181181#if OFF_MAX > LONG_MAX
    182     ULONG fAttributtes = fLarge ? info.fsts4L.attrFile : info.fsts4.attrFile;
     182    ULONG fAttributes = fLarge ? info.fsts4L.attrFile : info.fsts4.attrFile;
    183183#else
    184     ULONG fAttributtes = info.fsts4.attrFile;
    185 #endif
    186     pStat->st_attr = fAttributtes;
     184    ULONG fAttributes = info.fsts4.attrFile;
     185#endif
     186    pStat->st_attr = fAttributes;
    187187#if OFF_MAX > LONG_MAX
    188188    if (fLarge)
     
    197197        pStat->st_blocks = info.fsts4.cbFileAlloc / S_BLKSIZE;
    198198    }
    199     if (fAttributtes & FILE_DIRECTORY)
     199    if (fAttributes & FILE_DIRECTORY)
    200200    {
    201201        /* directory */
     
    205205    {
    206206        pStat->st_mode = S_IFREG;
    207         if (rc & FILE_READONLY)
     207        if (fAttributes & FILE_READONLY)
    208208            pStat->st_mode |= (S_IREAD >> 6) * 0111;
    209209        else
  • trunk/libc/src/kNIX/os2/b_fsNativeFileStat.c

    r3062 r3812  
    162162
    163163#if OFF_MAX > LONG_MAX
    164     ULONG fAttributtes = fLarge ? info.fsts4L.attrFile : info.fsts4.attrFile;
     164    ULONG fAttributes = fLarge ? info.fsts4L.attrFile : info.fsts4.attrFile;
    165165#else
    166     ULONG fAttributtes = info.fsts4.attrFile;
    167 #endif
    168     pStat->st_attr = fAttributtes;
     166    ULONG fAttributes = info.fsts4.attrFile;
     167#endif
     168    pStat->st_attr = fAttributes;
    169169#if OFF_MAX > LONG_MAX
    170170    if (fLarge)
     
    179179        pStat->st_blocks = info.fsts4.cbFileAlloc / S_BLKSIZE;
    180180    }
    181     if (fAttributtes & FILE_DIRECTORY)
     181    if (fAttributes & FILE_DIRECTORY)
    182182    {
    183183        /* directory */
     
    187187    {
    188188        pStat->st_mode = S_IFREG;
    189         if (rc & FILE_READONLY)
     189        if (fAttributes & FILE_READONLY)
    190190            pStat->st_mode |= (S_IREAD >> 6) * 0111;
    191191        else
Note: See TracChangeset for help on using the changeset viewer.