VirtualBox

Ignore:
Timestamp:
Apr 24, 2009 3:35:54 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46476
Message:

Shared folders: less ugly solution for making execute bits set on windows host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r18593 r19171  
    3939#undef LogFlow
    4040#define LogFlow Log
     41
     42/**
     43 * @todo find a better solution for supporting the execute bit for non-windows
     44 * guests on windows host. Search for "0111" to find all the relevant places.
     45 */
    4146
    4247void vbsfStripLastComponent (char *pszFullPath, uint32_t cbFullPathRoot)
     
    768773            if (RT_SUCCESS(RTPathQueryInfo (pszPath, &info, RTFSOBJATTRADD_NOTHING)))
    769774            {
     775#ifdef RT_OS_WINDOWS
     776                info.fMode |= 0111;
     777#endif
    770778                pParms->Info = info;
    771779            }
     
    841849        if (RT_SUCCESS(rc))
    842850        {
     851#ifdef RT_OS_WINDOWS
     852            info.fMode |= 0111;
     853#endif
    843854            pParms->Info = info;
    844855        }
     
    10381049        case VINF_SUCCESS:
    10391050        {
     1051#ifdef RT_OS_WINDOWS
     1052            info.fMode |= 0111;
     1053#endif
    10401054            pParms->Info = info;
    10411055            pParms->Result = SHFL_FILE_EXISTS;
     
    14241438        }
    14251439
     1440#ifdef RT_OS_WINDOWS
     1441        pDirEntry->Info.fMode |= 0111;
     1442#endif
    14261443        pSFDEntry->Info = pDirEntry->Info;
    14271444        pSFDEntry->cucShortName = 0;
     
    15311548    {
    15321549        rc = RTFileQueryInfo(pHandle->file.Handle, pObjInfo, RTFSOBJATTRADD_NOTHING);
     1550#ifdef RT_OS_WINDOWS
     1551        if (RT_SUCCESS(rc) && RTFS_IS_FILE(pObjInfo->Info.fMode))
     1552            pObjInfo->Info.fMode |= 0111;
     1553#endif
    15331554    }
    15341555    if (rc == VINF_SUCCESS)
     
    16531674        if (rc == VINF_SUCCESS)
    16541675        {
     1676#ifdef RT_OS_WINDOWS
     1677            fileinfo.fMode |= 0111;
     1678#endif
    16551679            *pSFDEntry = fileinfo;
    16561680            *pcbBuffer = sizeof(RTFSOBJINFO);
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