| 1526 | } |
| 1527 | |
| 1528 | DWORD CheckCascBuildFileDirs(CASC_BUILD_FILE & BuildFile, LPCTSTR szLocalPath) |
| 1529 | { |
| 1530 | CASC_PATH<TCHAR> WorkPath(szLocalPath, NULL); |
| 1531 | DWORD dwLevelCount = 0; |
| 1532 | |
| 1533 | // Clear the build file structure |
| 1534 | memset(&BuildFile, 0, sizeof(CASC_BUILD_FILE)); |
| 1535 | |
| 1536 | for(;;) |
| 1537 | { |
| 1538 | // Try all supported build file types |
| 1539 | for(size_t i = 0; i < _countof(BuildTypes); i++) |
| 1540 | { |
| 1541 | CASC_PATH<TCHAR> FilePath(WorkPath, BuildTypes[i].szFileName, NULL); |
| 1542 | |
| 1543 | // If the file exists there, we found it |
| 1544 | if(CheckCascBuildFileExact(BuildFile, FilePath) == ERROR_SUCCESS) |
| 1545 | { |
| 1546 | return ERROR_SUCCESS; |
| 1547 | } |
| 1548 | } |
| 1549 | |
| 1550 | // Try to cut off one path path. Don't go indefinitely. |
| 1551 | if((dwLevelCount > 5) || !WorkPath.CutLastPart()) |
| 1552 | { |
| 1553 | break; |
| 1554 | } |
| 1555 | } |
| 1556 | |
| 1557 | // None of the supported file names was found |
| 1558 | return ERROR_FILE_NOT_FOUND; |
| 1559 | } |
| 1560 | |
| 1561 | DWORD CheckOnlineStorage(PCASC_OPEN_STORAGE_ARGS pArgs, CASC_BUILD_FILE & BuildFile, bool bOnlineStorage) |
| 1562 | { |
no test coverage detected