VirtualBox

Changeset 70054 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Dec 11, 2017 11:50:39 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119593
Message:

DrvAudioCommon/DrvAudioHlpFile: Use RTFileIsValid(); minor logging adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r70022 r70054  
    13341334    if (pFile->enmType == PDMAUDIOFILETYPE_RAW)
    13351335    {
    1336         if (pFile->hFile != NIL_RTFILE)
    1337         {
     1336        if (RTFileIsValid(pFile->hFile))
    13381337            rc = RTFileClose(pFile->hFile);
    1339             pFile->hFile = NIL_RTFILE;
    1340         }
    13411338    }
    13421339    else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)
    13431340    {
    1344         if (pFile->hFile != NIL_RTFILE)
     1341        if (RTFileIsValid(pFile->hFile))
    13451342        {
    13461343            PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
     
    13521349
    13531350            rc = RTFileClose(pFile->hFile);
    1354             pFile->hFile = NIL_RTFILE;
    13551351        }
    13561352
     
    13751371    if (RT_SUCCESS(rc))
    13761372    {
     1373        pFile->hFile = NIL_RTFILE;
    13771374        LogRel2(("Audio: Closed file '%s' (%zu bytes)\n", pFile->szName, cbSize));
    13781375    }
     
    13941391
    13951392    int rc = RTFileDelete(pFile->szName);
     1393
     1394    if (rc == VERR_FILE_NOT_FOUND) /* Don't bitch if the file is not around (anymore). */
     1395        rc = VINF_SUCCESS;
     1396
    13961397    if (RT_FAILURE(rc))
    13971398        LogRel(("Audio: Failed deleting file '%s', rc=%Rrc\n", pFile->szName, rc));
Note: See TracChangeset for help on using the changeset viewer.

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