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

Function CheckDataFilesDirectory

src/External/CascLib/src/CascFiles.cpp:1615–1635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1613}
1614
1615DWORD CheckDataFilesDirectory(TCascStorage * hs)
1616{
1617 CASC_PATH<TCHAR> DataPath(hs->szRootPath, _T("data"), NULL);
1618 DWORD dwErrCode;
1619 bool bTwoDigitFolderFound = false;
1620
1621 // When CASC_FEATURE_ONLINE is not set, then the folder must exist
1622 if((hs->dwFeatures & CASC_FEATURE_ONLINE) == 0)
1623 {
1624 // Check if there are subfolders at all. If not, do not bother
1625 // the file system with open requests into data files folder
1626 if((dwErrCode = ScanDirectory(DataPath, CheckForTwoDigitFolder, NULL, &bTwoDigitFolderFound)) != ERROR_SUCCESS)
1627 return dwErrCode;
1628
1629 if(bTwoDigitFolderFound == false)
1630 return ERROR_PATH_NOT_FOUND;
1631 }
1632
1633 // Create the path for raw files
1634 return ((hs->szFilesPath = DataPath.New()) == NULL) ? ERROR_NOT_ENOUGH_MEMORY : ERROR_SUCCESS;
1635}
1636
1637DWORD LoadBuildFile_Versions_Cdns(TCascStorage * hs)
1638{

Callers 1

LoadCascStorageFunction · 0.85

Calls 2

ScanDirectoryFunction · 0.85
NewMethod · 0.45

Tested by

no test coverage detected