Changeset 826 for trunk/dll/init.c


Ignore:
Timestamp:
Sep 1, 2007, 11:50:33 PM (18 years ago)
Author:
Gregg Young
Message:

Add xDosSetPathInfo to work around FILESTATUSx buffer crossing 64k boundry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r803 r826  
    3535  23 Aug 07 SHL Use BldFullPathName
    3636  25 Aug 07 SHL Work around DosSetPathInfo kernel defect
     37  01 Sep 07 GKY Add xDosSetPathInfo to fix case where FS3 buffer crosses 64k boundry
    3738
    3839***********************************************************************/
     
    670671      if (fs3.attrFile & (FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM)) {
    671672        fs3.attrFile &= ~(FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM);
    672         rc = DosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0);
     673        rc = xDosSetPathInfo(inipath, FIL_STANDARD, &fs3, sizeof(fs3), 0);
    673674        if (rc) {
    674           /* Some kernels to do not handle fs3 buffers that cross 64K boundaries
    675              and return ERROR_INVALID_NAME
    676              If code works around the problem because if fs3 crosses the boundary
    677              fsa2 will not because we don't have enough data on the stack for this
    678              to occur 25 Aug 07 SHL
    679           */
    680           if (rc == ERROR_INVALID_NAME) {
    681             FILESTATUS3 fs3x;
    682             fs3x = fs3;
    683             rc = DosSetPathInfo(inipath, FIL_STANDARD, &fs3x, sizeof(fs3x), 0);
    684           }
    685           if (rc) {
    686             Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     675          Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
    687676                      GetPString(IDS_INIREADONLYTEXT), inipath);
    688677          }
    689         }
     678
    690679      }
    691680    }
Note: See TracChangeset for help on using the changeset viewer.