MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / ProcessLocalIndexFiles

Function ProcessLocalIndexFiles

src/External/CascLib/src/CascIndexFiles.cpp:480–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480static DWORD ProcessLocalIndexFiles(TCascStorage * hs, EKEY_ENTRY_CALLBACK PfnEKeyEntry, DWORD dwIndexCount)
481{
482 DWORD dwErrCode = ERROR_SUCCESS;
483
484 // Load each index file
485 for(DWORD i = 0; i < dwIndexCount; i++)
486 {
487 CASC_INDEX & IndexFile = hs->IndexFiles[i];
488
489 // Inform the user about what we are doing
490 if(InvokeProgressCallback(hs, "Loading index files", NULL, i, dwIndexCount))
491 {
492 dwErrCode = ERROR_CANCELLED;
493 break;
494 }
495
496 // Load the index file
497 if((dwErrCode = LoadIndexFile(hs, PfnEKeyEntry, IndexFile.FileData.pbData, IndexFile.FileData.cbData, i)) != ERROR_SUCCESS)
498 break;
499 }
500
501 // Swallow the "done parsing" error
502 if(dwErrCode == ERROR_INDEX_PARSING_DONE)
503 dwErrCode = ERROR_SUCCESS;
504
505 // Remember the number of files that are present locally
506 hs->LocalFiles = hs->CKeyArray.ItemCount();
507 return dwErrCode;
508}
509
510static DWORD LoadLocalIndexFiles(TCascStorage * hs)
511{

Callers 1

LoadLocalIndexFilesFunction · 0.85

Calls 3

InvokeProgressCallbackFunction · 0.85
LoadIndexFileFunction · 0.85
ItemCountMethod · 0.45

Tested by

no test coverage detected