mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:45:42 +00:00
[RAPPS] Replace Extract with FDI for handling .cab
FDI allows to have user-defined callbacks for file handling. Since it doesn't provide support for Unicode we convert strings to multi-byte UTF-8 and handle them appropriately in the callbacks. They are properly null-terminated so FDI won't choke when doing operations with strings. Thanks to hbelusca and mjansen for the help. CORE-14466
This commit is contained in:
parent
602db40277
commit
9591550116
7 changed files with 348 additions and 90 deletions
|
@ -213,7 +213,9 @@ AvailableStrings::AvailableStrings()
|
|||
if (GetStorageDirectory(szPath))
|
||||
{
|
||||
szAppsPath = szPath + L"\\rapps\\";
|
||||
szCabPath = szPath + L"\\rappmgr.cab";
|
||||
szCabName = L"rappmgr.cab";
|
||||
szCabDir = szPath;
|
||||
szCabPath = (szCabDir + L"\\") + szCabName;
|
||||
szSearchPath = szAppsPath + L"*.txt";
|
||||
}
|
||||
}
|
||||
|
@ -282,7 +284,9 @@ BOOL CAvailableApps::UpdateAppsDB()
|
|||
|
||||
CDownloadManager::DownloadApplicationsDB(APPLICATION_DATABASE_URL);
|
||||
|
||||
if (!ExtractFilesFromCab(m_Strings.szCabPath, m_Strings.szAppsPath))
|
||||
if (!ExtractFilesFromCab(m_Strings.szCabName,
|
||||
m_Strings.szCabDir,
|
||||
m_Strings.szAppsPath))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue