diff --git a/lib/libc/other/realpath.c b/lib/libc/other/realpath.c index f331bd3d1..3a43445e7 100644 --- a/lib/libc/other/realpath.c +++ b/lib/libc/other/realpath.c @@ -170,8 +170,8 @@ static char *realpath_recurse(const char *file_name, char *resolved_name, max_depth)) return NULL; - /* skip the slash */ - if (*file_name == '/') + /* skip the slash(es) */ + while (*file_name == '/') file_name++; }