| 201 | } |
| 202 | |
| 203 | static LPTSTR MakeFullPath(LPTSTR szBuffer, size_t ccBuffer, LPCSTR szStorage) |
| 204 | { |
| 205 | LPTSTR szBufferEnd = szBuffer + ccBuffer - 1; |
| 206 | LPCSTR szPathRoot = CASC_PATH_ROOT; |
| 207 | |
| 208 | // Does it look like a DOS path? |
| 209 | if(isalpha(szStorage[0]) && szStorage[1] == ':' && szStorage[2] == '\\') |
| 210 | { |
| 211 | return CopyPath(szBuffer, szBufferEnd, szStorage); |
| 212 | } |
| 213 | |
| 214 | // If we can not access the folder directly, we copy the path root |
| 215 | if(_access(szStorage, 0) == -1) |
| 216 | { |
| 217 | szBuffer = CopyPath(szBuffer, szBufferEnd, szPathRoot); |
| 218 | szBuffer = CopyPath(szBuffer, szBufferEnd, PATH_SEP_STRING); |
| 219 | } |
| 220 | |
| 221 | // Copy the rest of the path |
| 222 | return CopyPath(szBuffer, szBufferEnd, szStorage); |
| 223 | } |
| 224 | |
| 225 | static LPCTSTR GetTheProperListfile(HANDLE hStorage, LPCTSTR szListFile) |
| 226 | { |
no test coverage detected