From: Jim Meyering Date: Sat, 11 Mar 2006 20:40:18 +0000 (+0000) Subject: (robust_getcwd): Prepend only one slash, not two. X-Git-Tag: v6.0~631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28bffbc6fe4630b442a747e5a43934459d9e9668;p=thirdparty%2Fcoreutils.git (robust_getcwd): Prepend only one slash, not two. --- diff --git a/src/pwd.c b/src/pwd.c index 9fd8515a4f..3a7ff5aac0 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -279,8 +279,9 @@ robust_getcwd (struct file_name *file_name) find_dir_entry (&dot_sb, file_name, height++); } + /* See if a leading slash is needed; file_name_prepend adds one. */ if (file_name->start[0] == '\0') - file_name_prepend (file_name, "/", 1); + file_name_prepend (file_name, "", 0); } int