| 81 | } |
| 82 | |
| 83 | bool TryThisBasePath() |
| 84 | { |
| 85 | LPCTSTR p1 = NULL, p2 = NULL; |
| 86 | p1 = ConvertCppStringToTString(GetBasePath()); |
| 87 | p2 = ConvertCppStringToTString(GetCachePath()); |
| 88 | |
| 89 | bool result = true; |
| 90 | |
| 91 | // if these already exist, it's fine.. |
| 92 | if (!CreateDirectory(p1, NULL) || !CreateDirectory(p2, NULL)) |
| 93 | { |
| 94 | if (GetLastError() != ERROR_ALREADY_EXISTS) |
| 95 | result = false; |
| 96 | } |
| 97 | |
| 98 | if (p1) free((void*)p1); |
| 99 | if (p2) free((void*)p2); |
| 100 | |
| 101 | return result; |
| 102 | } |
| 103 | |
| 104 | void SetupCachePathIfNeeded() |
| 105 | { |
no test coverage detected