* Handle a path that couldn't be lstat'ed. It's either: * - missing file (ENOENT or ENOTDIR). That's ok if we're * supposed to be removing it and the removal actually * succeeds. * - permission error. That's never ok. */
| 274 | * - permission error. That's never ok. |
| 275 | */ |
| 276 | static int process_lstat_error(const char *path, int err) |
| 277 | { |
| 278 | if (is_missing_file_error(err)) |
| 279 | return remove_one_path(path); |
| 280 | return error("lstat(\"%s\"): %s", path, strerror(err)); |
| 281 | } |
| 282 | |
| 283 | static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st) |
| 284 | { |
no test coverage detected