[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bugs in dirname module - coreutils portion
From: |
Eric Blake |
Subject: |
Re: bugs in dirname module - coreutils portion |
Date: |
Wed, 30 Nov 2005 07:05:50 -0700 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 11/30/2005 6:47 AM:
> Thanks for the big patch -- and for your patience.
>
> I've been holding off because I don't want this to interfere with
> the pending patch to add ACL support.
Fine with me. Besides, my copyright papers are still apparently not
finalized, even though I mailed them more than two weeks ago, so my patch
technically shouldn't be applied until the FSF clears me.
>
> One question: why continue to use base_name in rm.c, rather than
> converting that use to last_component, the way you did in all of
> the other cases?
Because rm.c is printing the base_name in user output, rather than
building a filename internally for use by another method. If, on cygwin,
a user did 'ln -s /bin/rm /managed/a:b', then the lines in "/managed/a:b
- --help" can't use last_component, because "a:b" names a different file
than /managed/a:b, even if /managed is on my PATH. But I guess even
base_name is still not correct, since if I am not in /managed, "./a:b" is
also wrong. I think the better fix for rm.c would be to use program_name
instead of base, so that this patch overrides my initial patch for rm.c.
2005-11-30 Eric Blake <address@hidden>
* src/rm.c (usage): Use program_name instead of a basename.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDjbG+84KuGfSFAYARAnC/AKCcqnrr8mFcHXyoBhXKjqeSl6ELUgCgpLgN
njxBDYxWNv7f8sX0rpCmJQg=
=TRKk
-----END PGP SIGNATURE-----
Index: src/rm.c
===================================================================
RCS file: /cvsroot/coreutils/coreutils/src/rm.c,v
retrieving revision 1.136
diff -u -p -r1.136 rm.c
--- src/rm.c 2 Nov 2005 21:53:20 -0000 1.136
+++ src/rm.c 30 Nov 2005 14:02:56 -0000
@@ -132,7 +132,6 @@ usage (int status)
program_name);
else
{
- char *base = base_name (program_name);
printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
fputs (_("\
Remove (unlink) the FILE(s).\n\
@@ -161,7 +160,7 @@ use one of these commands:\n\
\n\
%s ./-foo\n\
"),
- base, base);
+ program_name, program_name);
fputs (_("\
\n\
Note that if you use rm to remove a file, it is usually possible to recover\n\