VirtualBox

Changeset 91388 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 27, 2021 10:46:15 AM (3 years ago)
Author:
vboxsync
Message:

Main/ExtPackManagerImpl: Use RTPathXxxx function instead of RTStrPrintf2 to construct paths! bugref:1909

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r91322 r91388  
    821821    {
    822822        char szPath[RTPATH_MAX];
    823         ssize_t cchOkay = RTStrPrintf2(szPath, sizeof(szPath), "%s%s%s", a_pszDir,
    824                                        RTPATH_SLASH_STR "nls" RTPATH_SLASH_STR,
    825                                        m->pReg->pszNlsBaseName);
    826         if (cchOkay > 0)
    827         {
    828             rc = VirtualBoxTranslator::registerTranslation(szPath, false, &m->pTrComponent);
    829             if (RT_FAILURE(rc))
    830                 m->pTrComponent = NULL;
     823        rc = RTPathJoin(szPath, sizeof(szPath), a_pszDir, "nls");
     824        if (RT_SUCCESS(rc))
     825        {
     826            rc = RTPathAppend(szPath, sizeof(szPath), m->pReg->pszNlsBaseName);
     827            if (RT_SUCCESS(rc))
     828            {
     829                rc = VirtualBoxTranslator::registerTranslation(szPath, false, &m->pTrComponent);
     830                if (RT_FAILURE(rc))
     831                    m->pTrComponent = NULL;
     832            }
    831833        }
    832834    }
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