VirtualBox

儲存庫 vbox 的更動 66091


忽略:
時間撮記:
2017-3-14 下午02:03:16 (8 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
113966
訊息:

SharedFolders: fixed regression with Windows extended-length paths.

位置:
trunk/src/VBox/HostServices/SharedFolders
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/HostServices/SharedFolders/Makefile.kmk

    r60765 r66091  
    4141        vbsf.cpp \
    4242        vbsfpath.cpp \
     43        vbsfpathabs.cpp \
    4344        mappings.cpp
    4445VBoxSharedFolders_SOURCES.win = \
  • trunk/src/VBox/HostServices/SharedFolders/mappings.cpp

    r65998 r66091  
    2020
    2121#include "mappings.h"
     22#include "vbsfpath.h"
    2223#include <iprt/alloc.h>
    2324#include <iprt/assert.h>
     
    228229               likely to get into trouble with buffer sizes in vbsfPathGuestToHost. */
    229230            char szAbsFolderName[RTPATH_MAX];
    230             int rc = RTPathAbs(pszFolderName, szAbsFolderName, sizeof(szAbsFolderName));
     231            int rc = vbsfPathAbs(NULL, pszFolderName, szAbsFolderName, sizeof(szAbsFolderName));
    231232            AssertRCReturn(rc, rc);
    232233
  • trunk/src/VBox/HostServices/SharedFolders/vbsfpath.cpp

    r66039 r66091  
    598598
    599599                    /* Construct the full host path removing '.' and '..'. */
    600                     rc = RTPathAbsEx(pszRoot, pchVerifiedPath, pszFullPath, cbFullPathAlloc);
     600                    rc = vbsfPathAbs(pszRoot, pchVerifiedPath, pszFullPath, cbFullPathAlloc);
    601601                    if (RT_SUCCESS(rc))
    602602                    {
     
    649649                    else
    650650                    {
    651                         LogFunc(("RTPathAbsEx %Rrc\n", rc));
     651                        LogFunc(("vbsfPathAbs %Rrc\n", rc));
    652652                    }
    653653                }
  • trunk/src/VBox/HostServices/SharedFolders/vbsfpath.h

    r65123 r66091  
    5151void vbsfFreeHostPath(char *pszHostPath);
    5252
     53/**
     54 * Build the absolute path by combining an absolute pszRoot and a relative pszPath.
     55 * The resulting path does not contain '.' and '..' components.
     56 * Similar to RTPathAbsEx but with support for Windows extended-length paths ("\\?\" prefix).
     57 * Uses RTPathAbsEx for regular paths and on non-Windows hosts.
     58 *
     59 * @param pszRoot The absolute prefix. It is copied to the pszAbsPath without any processing.
     60 *                If NULL then the pszPath must be converted to the absolute path.
     61 * @param pszPath The relative path to be appended to pszRoot. Already has correct delimiters (RTPATH_SLASH).
     62 * @param pszAbsPath Where to store the resulting absolute path.
     63 * @param cbAbsPath Size of pszAbsBuffer in bytes.
     64 */
     65int vbsfPathAbs(const char *pszRoot, const char *pszPath, char *pszAbsPath, size_t cbAbsPath);
     66
    5367#endif /* __VBSFPATH__H */
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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