From 2328d8dbb5a8c774afb99d363b6e98cd25ee304d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 9 Jul 2017 16:35:38 -0400 Subject: Handle ENOTDIR the same as ENOENT For a/b/c, ENOTDIR is returned instead of ENOENT if a or b are not directories. Handle this uniformly when detecting broken symlinks, readdir races, etc. --- printf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'printf.c') diff --git a/printf.c b/printf.c index 888fecb..9b284b4 100644 --- a/printf.c +++ b/printf.c @@ -371,6 +371,7 @@ static int bfs_printf_Y(FILE *file, const struct bfs_printf_directive *directive type = "L"; break; case ENOENT: + case ENOTDIR: type = "N"; break; } -- cgit v1.2.3