VirtualBox

Ignore:
Timestamp:
Oct 7, 2015 12:05:47 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103125
Message:

IPRT,*: Simplified RTUriFilePath by removing the uFormat parameter. It now defaults to the host path style just like RTUriFileCreate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/uri.cpp

    r58068 r58069  
    11531153
    11541154
    1155 RTDECL(char *) RTUriFilePath(const char *pszUri, uint32_t uFormat)
    1156 {
    1157     uint32_t fPathStyle;
    1158     switch (uFormat)
    1159     {
    1160         case URI_FILE_FORMAT_WIN:  fPathStyle = RTPATH_STR_F_STYLE_DOS; break;
    1161         case URI_FILE_FORMAT_UNIX: fPathStyle = RTPATH_STR_F_STYLE_UNIX; break;
    1162         case URI_FILE_FORMAT_AUTO: fPathStyle = RTPATH_STR_F_STYLE_HOST; break;
    1163         default: AssertFailedReturn(NULL);
    1164     }
    1165 
     1155RTDECL(char *) RTUriFilePath(const char *pszUri)
     1156{
    11661157    char *pszPath = NULL;
    1167     int rc = RTUriFilePathEx(pszUri, fPathStyle, &pszPath, 0 /*cbPath*/, NULL /*pcchPath*/);
     1158    int rc = RTUriFilePathEx(pszUri, RTPATH_STR_F_STYLE_HOST, &pszPath, 0 /*cbPath*/, NULL /*pcchPath*/);
    11681159    if (RT_SUCCESS(rc))
    11691160        return pszPath;
Note: See TracChangeset for help on using the changeset viewer.

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