VirtualBox

Ignore:
Timestamp:
Sep 9, 2020 2:34:49 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140292
Message:

IPRT/RTLocaleQueryLocaleName: ticketref:19856 'VBoxManage unattended install' fails to detect system locale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/generic/RTLocaleQueryLocaleName-r3-generic.cpp

    r82968 r86074  
    3636#include <iprt/errcore.h>
    3737#include <iprt/string.h>
     38#ifdef RT_OS_SOLARIS
     39#include <iprt/path.h>
     40#endif /* RT_OS_SOLARIS */
    3841
    3942
     
    4245{
    4346    const char *pszLocale = setlocale(LC_ALL, NULL);
    44     if (!pszLocale)
     47    if (pszLocale)
     48    {
     49#ifdef RT_OS_SOLARIS /* Solaris can return a locale starting with a slash ('/'), e.g. /en_GB.UTF-8/C/C/C/C/C */
     50        if (RTPATH_IS_SLASH(*pszLocale))
     51            pszLocale++;
     52#endif /* RT_OS_SOLARIS */
    4553        return RTStrCopy(pszName, cbName, pszLocale);
     54    }
    4655    return VERR_NOT_AVAILABLE;
    4756}
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