Changeset 100463 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Jul 10, 2023 2:36:27 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp
r100427 r100463 130 130 * @param pTransfer Clipboard transfer to resolve path for. 131 131 * @param pszPath Relative path to resolve. 132 * Paths have to end with a (back-)slash, otherwise this is considered to be a file. 132 133 * @param fFlags Resolve flags. Currently not used and must be 0. 133 134 * @param ppszResolved Where to store the allocated resolved path. Must be free'd by the called using RTStrFree(). … … 136 137 char **ppszResolved) 137 138 { 138 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 139 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); 140 AssertReturn (fFlags == 0, VERR_INVALID_PARAMETER); 141 142 LogFlowFunc(("pszPathRootAbs=%s, pszPath=%s\n", pTransfer->pszPathRootAbs, pszPath)); 139 AssertPtrReturn(pTransfer, VERR_INVALID_POINTER); 140 AssertPtrReturn(pszPath, VERR_INVALID_POINTER); 141 AssertReturn (fFlags == 0, VERR_INVALID_PARAMETER); 142 AssertPtrReturn(ppszResolved, VERR_INVALID_POINTER); 143 144 LogFlowFunc(("pszPath=%s, fFlags=%#x (pszPathRootAbs=%s, cRootListEntries=%RU64)\n", 145 pszPath, fFlags, pTransfer->pszPathRootAbs, pTransfer->lstRoots.Hdr.cEntries)); 143 146 144 147 int rc = ShClTransferValidatePath(pszPath, false /* fMustExist */); … … 147 150 rc = VERR_PATH_NOT_FOUND; /* Play safe by default. */ 148 151 149 /* Make sure the given path is part of the set of root entries. */150 152 PSHCLLISTENTRY pEntry; 151 153 RTListForEach(&pTransfer->lstRoots.lstEntries, pEntry, SHCLLISTENTRY, Node) … … 153 155 LogFlowFunc(("\tpEntry->pszName=%s\n", pEntry->pszName)); 154 156 155 if ( !RTStrCmp(pszPath, pEntry->pszName)) /* Case-sensitive! */157 if (RTStrStartsWith(pszPath, pEntry->pszName)) /* Case-sensitive! */ 156 158 { 157 159 rc = VINF_SUCCESS; … … 174 176 if (RT_SUCCESS(rc)) 175 177 { 176 LogFlowFunc(("pszResolved=%s\n", szResolved)); 177 178 if (RT_SUCCESS(rc)) 179 *ppszResolved = RTStrDup(szResolved); 178 LogRel2(("Shared Clipboard: Resolved: '%s' -> '%s'\n", pszPath, szResolved)); 179 180 *ppszResolved = RTStrDup(szResolved); 180 181 } 181 182 }
Note:
See TracChangeset
for help on using the changeset viewer.