VirtualBox

Changeset 69592 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 6, 2017 12:39:17 PM (7 years ago)
Author:
vboxsync
Message:

vfsstdfile.cpp: Tweaked the flush implementation to hush up VERR_INVALID_HANDLE on console handles on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsstdfile.cpp

    r69111 r69592  
    245245{
    246246    PRTVFSSTDFILE pThis = (PRTVFSSTDFILE)pvThis;
    247     return RTFileFlush(pThis->hFile);
     247    int rc = RTFileFlush(pThis->hFile);
     248#ifdef RT_OS_WINDOWS
     249    /* Workaround for console handles. */  /** @todo push this further down? */
     250    if (   rc == VERR_INVALID_HANDLE
     251        && RTFileIsValid(pThis->hFile))
     252        rc = VINF_NOT_SUPPORTED; /* not flushable */
     253#endif
     254    return rc;
    248255}
    249256
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