From: Ulrich Drepper Date: Thu, 4 Apr 2002 08:10:41 +0000 (+0000) Subject: (dirname): Ignore trailing slashes at end of non-null result. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4ee429b583a5ad70463c89657648a190a65e949;p=thirdparty%2Fglibc.git (dirname): Ignore trailing slashes at end of non-null result. --- diff --git a/misc/dirname.c b/misc/dirname.c index b1a0e0c2ac2..94ab1c085f9 100644 --- a/misc/dirname.c +++ b/misc/dirname.c @@ -1,5 +1,5 @@ /* dirname - return directory part of PATH. - Copyright (C) 1996, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -66,6 +66,8 @@ dirname (char *path) else last_slash = path + 1; } + else + last_slash = runp; last_slash[0] = '\0'; }