From: Erik van der Kouwe Date: Mon, 6 Sep 2010 07:45:32 +0000 (+0000) Subject: Make realpath deal with double slashes X-Git-Tag: v3.1.8~13 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=5cc29a6c7ef6b28a1ea592276e0d1cdce8833b97;p=minix.git Make realpath deal with double slashes --- 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++; }