-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 3/3/2006 9:53 AM: > > Why do you want to merge this change with the > already-big basename/dirname one? >
OK, I'll send the root-dev-ino patch separately from the basename/dirname one. > Thanks, this does look good. > Would you please keep the bug-fix separate, and include > a test for it, if possible? The bug is present only when xgetcwd fails to determine that you are in /; then robust_getcwd kicks in, determines that you are already at the root, and was prepending "/" to "/" resulting in "//". The fix is to prepend "/" to "", but I don't see how it is possible to write a test without the use of a debugger (since if xgetcwd fails to determine you are in /, your system has major problems). 2006-03-11 Eric Blake <[EMAIL PROTECTED]> * src/pwd.c (robust_getcwd): Prepend only one slash, not two. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEEutA84KuGfSFAYARAjCQAKDVOPdxVpdDoK/ahoKT952lOIH5BwCfQiSg G5SPHu0D1EF2vrBmbv4GaOc= =yT2g -----END PGP SIGNATURE-----
Index: src/pwd.c =================================================================== RCS file: /sources/coreutils/coreutils/src/pwd.c,v retrieving revision 1.59 diff -u -p -r1.59 pwd.c --- src/pwd.c 26 Feb 2006 10:02:49 -0000 1.59 +++ src/pwd.c 11 Mar 2006 15:19:04 -0000 @@ -279,8 +279,9 @@ robust_getcwd (struct file_name *file_na 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
_______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils