VirtualBox

Changeset 77641 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 11, 2019 1:28:09 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/fileio-win.cpp: Corrected RTFileReadAt so it does not return VERR_EOF when pcbRead is non-NULL, preserving the previous behavior and unixy host behaviour of the function. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r77231 r77641  
    550550        return VINF_SUCCESS;
    551551    }
    552     return RTErrConvertFromWin32(GetLastError());
     552
     553    /* We will get an EOF error when using overlapped I/O.  So, make sure we don't
     554       return it when pcbhRead is not NULL. */
     555    DWORD dwErr = GetLastError();
     556    if (pcbRead && dwErr == ERROR_HANDLE_EOF)
     557    {
     558        *pcbRead = 0;
     559        return VINF_SUCCESS;
     560    }
     561    return RTErrConvertFromWin32(dwErr);
    553562}
    554563
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