* Simplify filenames from tars. * Replace '/' by #PATHSEPCHAR, and force 'name' to lowercase. * @param name Filename to process. */
| 358 | * @param name Filename to process. |
| 359 | */ |
| 360 | static void SimplifyFileName(std::string &name) |
| 361 | { |
| 362 | for (char &c : name) { |
| 363 | /* Force lowercase */ |
| 364 | c = std::tolower(c); |
| 365 | #if (PATHSEPCHAR != '/') |
| 366 | /* Tar-files always have '/' path-separator, but we want our PATHSEPCHAR */ |
| 367 | if (c == '/') c = PATHSEPCHAR; |
| 368 | #endif |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Perform the scanning of a particular subdirectory. |