Changeset 103618 in vbox
- Timestamp:
- Feb 29, 2024 7:07:40 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r103616 r103618 1854 1854 PSHCLLIST pLstRoots = &pTransfer->lstRoots; 1855 1855 char *pszPathRootAbs = NULL; 1856 size_t cchPathRootAbs = 0; 1856 1857 1857 1858 RTCList<RTCString> lstRootEntries = RTCString(pszRoots, cbRoots).split(pszSep); … … 1902 1903 if (RTPathStartsWithRoot(pszPathRootAbs)) 1903 1904 { 1904 rc = ShClTransferValidatePath(pszPathRootAbs, true /* Path must exist */); 1905 cchPathRootAbs = RTStrNLen(pszPathRootAbs, RTPATH_MAX); 1906 LogRel2(("Shared Clipboard: Transfer uses root '%s'\n", pszPathRootAbs)); 1905 1907 } 1906 1908 else … … 1925 1927 { 1926 1928 /* Calculate the relative path within the root path. */ 1927 const char *pszPathRelToRoot = &pszPathCur[strlen(pszPathRootAbs) + 1 /* Skip terminator or (back)slash. */]; 1929 Assert(RTStrNLen(pszPathCur, RTPATH_MAX) >= cchPathRootAbs); /* Sanity. */ 1930 const char *pszPathRelToRoot = pszPathCur + cchPathRootAbs; 1928 1931 if ( pszPathRelToRoot 1929 1932 && *pszPathRelToRoot != '\0') 1930 1933 { 1931 Log FlowFunc(("pszPathRelToRoot=%s\n", pszPathRelToRoot));1934 LogRel2(("Shared Clipboard: Adding list entry '%s'\n", pszPathRelToRoot)); 1932 1935 1933 1936 rc = ShClTransferListEntryInitEx(pEntry, VBOX_SHCL_INFO_F_FSOBJINFO, pszPathRelToRoot, … … 1937 1940 rc = ShClTransferListAddEntry(pLstRoots, pEntry, true /* fAppend */); 1938 1941 if (RT_SUCCESS(rc)) 1939 {1940 1942 pFsObjInfo = NULL; /* pEntry has ownership now. */ 1941 }1942 1943 } 1943 1944 } 1944 1945 else 1946 { 1945 1947 LogRel(("Shared Clipboard: Unable to construct relative path for '%s' (root is '%s')\n", 1946 1948 pszPathCur, pszPathRootAbs)); 1949 rc = VERR_PATH_DOES_NOT_START_WITH_ROOT; 1950 } 1947 1951 } 1948 1952 … … 1965 1969 1966 1970 /* No (valid) root directory found? Bail out early. */ 1967 if (!pszPathRootAbs) 1971 if ( RT_SUCCESS(rc) 1972 && !pszPathRootAbs) 1968 1973 rc = VERR_PATH_DOES_NOT_START_WITH_ROOT; 1969 1974 … … 1972 1977 pTransfer->pszPathRootAbs = pszPathRootAbs; 1973 1978 LogFlowFunc(("pszPathRootAbs=%s, cRoots=%zu\n", pTransfer->pszPathRootAbs, pTransfer->lstRoots.Hdr.cEntries)); 1974 1975 LogRel2(("Shared Clipboard: Transfer uses root '%s'\n", pTransfer->pszPathRootAbs));1976 1979 } 1977 1980 else
Note:
See TracChangeset
for help on using the changeset viewer.

