Changeset 81290 in vbox for trunk/src/VBox/GuestHost/SharedClipboard
- Timestamp:
- Oct 15, 2019 4:53:56 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133985
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp
r81260 r81290 1667 1667 LogFlowFuncLeaveRC(rc); 1668 1668 return rc; 1669 }1670 1671 /**1672 * Translates an absolute path to a relative one.1673 *1674 * @returns Translated, allocated path on success, or NULL on failure.1675 * Must be free'd with RTStrFree().1676 * @param pszPath Absolute path to translate.1677 */1678 static char *sharedClipboardPathTranslate(const char *pszPath)1679 {1680 AssertPtrReturn(pszPath, NULL);1681 1682 LogFlowFunc(("pszPath=%s\n", pszPath));1683 1684 char *pszPathTranslated = NULL;1685 1686 char *pszSrcPath = RTStrDup(pszPath);1687 if (pszSrcPath)1688 {1689 size_t cbSrcPathLen = RTPathStripTrailingSlash(pszSrcPath);1690 if (cbSrcPathLen)1691 {1692 char *pszFileName = RTPathFilename(pszSrcPath);1693 if (pszFileName)1694 {1695 Assert(pszFileName >= pszSrcPath);1696 size_t cchDstBase = pszFileName - pszSrcPath;1697 1698 pszPathTranslated = RTStrDup(&pszSrcPath[cchDstBase]);1699 1700 LogFlowFunc(("pszSrcPath=%s, pszFileName=%s -> pszPathTranslated=%s\n",1701 pszSrcPath, pszFileName, pszPathTranslated));1702 }1703 }1704 1705 RTStrFree(pszSrcPath);1706 }1707 1708 return pszPathTranslated;1709 1669 } 1710 1670
Note:
See TracChangeset
for help on using the changeset viewer.