VirtualBox

Changeset 56900 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 9, 2015 2:24:26 PM (9 years ago)
Author:
vboxsync
Message:

DnD: DNDDIRDROPPEDFILES: Track directory open status internally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDDir.cpp

    r55640 r56900  
    9797            pDir->hDir       = phDir;
    9898            pDir->strPathAbs = pszDropDir;
     99            pDir->fOpen      = true;
    99100        }
    100101    }
     
    125126    AssertPtrReturn(pDir, VERR_INVALID_POINTER);
    126127
    127     int rc = RTDirClose(pDir->hDir);
     128    int rc = VINF_SUCCESS;
     129    if (pDir->fOpen)
     130    {
     131        rc = RTDirClose(pDir->hDir);
     132        if (RT_SUCCESS(rc))
     133            pDir->fOpen = false;
     134    }
    128135    if (RT_SUCCESS(rc))
    129136    {
     
    131138        pDir->lstFiles.clear();
    132139
    133         if (fRemove)
     140        if (   fRemove
     141            && pDir->strPathAbs.isNotEmpty())
    134142        {
    135143            /* Try removing the (empty) drop directory in any case. */
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