| 207 | } |
| 208 | |
| 209 | void CLocatorAPI::RegisterFolderHierarchy(LPCSTR folder_path) |
| 210 | { |
| 211 | string_path temp; |
| 212 | strcpy_s(temp, folder_path); |
| 213 | |
| 214 | string_path path; |
| 215 | string_path folder; |
| 216 | while (temp[0]) |
| 217 | { |
| 218 | _splitpath(temp, path, folder, nullptr, nullptr); |
| 219 | |
| 220 | if (!folder[0]) |
| 221 | break; |
| 222 | strcat_s(path, folder); |
| 223 | if (!exist(path)) |
| 224 | { |
| 225 | file desc; |
| 226 | |
| 227 | desc.name = xr_strdup(path); |
| 228 | desc.vfs = VFS_STANDARD_FILE; |
| 229 | desc.ptr = 0; |
| 230 | desc.size_real = 0; |
| 231 | desc.size_compressed = 0; |
| 232 | desc.time_write = u32(-1); |
| 233 | desc.folder = true; |
| 234 | |
| 235 | std::pair<files_it, bool> I = files.insert(desc); |
| 236 | |
| 237 | R_ASSERT(I.second); |
| 238 | } |
| 239 | strcpy_s(temp, path); // strcpy_s(temp, folder); |
| 240 | if (xr_strlen(temp)) |
| 241 | temp[xr_strlen(temp) - 1] = 0; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | /* Archives */ |
| 246 | |