| 448 | } |
| 449 | |
| 450 | static bool check_directory(const char *directory) |
| 451 | { |
| 452 | struct stat buf; |
| 453 | |
| 454 | if (stat(directory, &buf) < 0) |
| 455 | { |
| 456 | debug("stat of %s failed: %s\n", directory, strerror(errno)); |
| 457 | return false; |
| 458 | } |
| 459 | |
| 460 | if (!S_ISDIR(buf.st_mode)) |
| 461 | { |
| 462 | debug("%s exists but is not a directory\n", directory); |
| 463 | return false; |
| 464 | } |
| 465 | |
| 466 | return true; |
| 467 | } |
| 468 | |
| 469 | static void verify_directory(const char *directory) |
| 470 | { |
no test coverage detected