VirtualBox

Changeset 98774 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 28, 2023 10:30:06 AM (23 months ago)
Author:
vboxsync
Message:

Guest Control/VBoxService: Use (some) of the newly added GSTCTL_CREATEDIRECTORY_F_ flags. bugref:9783

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r98709 r98774  
    12791279        if (!(fCreate & ~GSTCTL_CREATEDIRECTORY_F_VALID_MASK))
    12801280        {
    1281             VGSvcVerbose(4, "Creating directory (szPath='%s', fMode=%#x, fCreate=%#x), rc=%Rrc\n", szPath, fMode, fCreate, rc);
    1282             rc = RTDirCreate(szPath, fMode, fCreate);
     1281            /* Translate flags. */
     1282            int fCreateRuntime = 0; /* RTDIRCREATE_FLAGS_XXX */
     1283            if (fCreate & GSTCTL_CREATEDIRECTORY_F_NO_SYMLINKS)
     1284                fCreateRuntime |= RTDIRCREATE_FLAGS_NO_SYMLINKS;
     1285            if (fCreate & GSTCTL_CREATEDIRECTORY_F_IGNORE_UMASK)
     1286                fCreateRuntime |= RTDIRCREATE_FLAGS_IGNORE_UMASK;
     1287
     1288            if (fCreate & GSTCTL_CREATEDIRECTORY_F_PARENTS)
     1289                rc = RTDirCreateFullPath(szPath, fMode);
     1290            else
     1291                rc = RTDirCreate(szPath, fMode, fCreateRuntime);
     1292
     1293            VGSvcVerbose(4, "Creating directory (szPath='%s', fMode=%#x, fCreate=%#x) -> rc=%Rrc\n", szPath, fMode, fCreate, rc);
    12831294        }
    12841295        else
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