VirtualBox

Changeset 78184 in vbox for trunk/src/VBox/Runtime/r3/win


Ignore:
Timestamp:
Apr 17, 2019 8:26:41 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/RTPathGetCurrent/win: Upper case the drive letter so it is consistent with RTPathAbsEx. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/path-win.cpp

    r78153 r78184  
    3535#include <iprt/path.h>
    3636#include <iprt/assert.h>
     37#include <iprt/ctype.h>
    3738#include <iprt/err.h>
    3839#include <iprt/ldr.h>
     
    682683            RTUTF16 wszFullPath[RTPATH_MAX];
    683684            if (GetFullPathNameW(wszCurPath, RTPATH_MAX, wszFullPath, NULL))
     685            {
     686                if (   wszFullPath[1] == ':'
     687                    && RT_C_IS_LOWER(wszFullPath[0]))
     688                    wszFullPath[0] = RT_C_TO_UPPER(wszFullPath[0]);
     689
    684690                rc = RTUtf16ToUtf8Ex(&wszFullPath[0], RTSTR_MAX, &pszPath, cchPath, NULL);
     691            }
    685692            else
    686693                rc = RTErrConvertFromWin32(GetLastError());
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