* This is like 'lstat()', except it refuses to follow symlinks * in the path, after skipping "skiplen". */
| 426 | * in the path, after skipping "skiplen". |
| 427 | */ |
| 428 | static int check_path(const char *path, int len, struct stat *st, int skiplen) |
| 429 | { |
| 430 | const char *slash = path + len; |
| 431 | |
| 432 | while (path < slash && *slash != '/') |
| 433 | slash--; |
| 434 | if (!has_dirs_only_path(path, slash - path, skiplen)) { |
| 435 | errno = ENOENT; |
| 436 | return -1; |
| 437 | } |
| 438 | return lstat(path, st); |
| 439 | } |
| 440 | |
| 441 | static void mark_colliding_entries(const struct checkout *state, |
| 442 | struct cache_entry *ce, struct stat *st) |
no test coverage detected