bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fileutils-4.0.43 - ls] 'ls a b' when a doesn't exist and isdir(b)


From: Jim Meyering
Subject: Re: [fileutils-4.0.43 - ls] 'ls a b' when a doesn't exist and isdir(b)
Date: 22 Apr 2001 11:21:51 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.103

Jim Meyering <address@hidden> wrote:
| Stephane CHAZELAS <address@hidden> wrote:
| | On Thu, Apr 19, 2001 at 08:50:04PM +0200, I wrote:
| | > On Wed, Apr 18, 2001 at 10:18:55PM +0200, I wrote:
| | > > Here is a simple patch that should fix it:
| | > [buggy patch]
| | >
| | > Oops, this one should be better, sorry:
| | [other buggy patch]
| |
| | Ok, I guess you'll find out the right way to fix this.
| | My previous patch failed with ls -R dir
| |
| | I hope this one is better:
| |
| | --- ls.c~       Wed Apr 18 21:27:52 2001
| | +++ ls.c        Fri Apr 20 19:22:27 2001
| | @@ -854,6 +854,7 @@
| |  {
| |    register int i;
| |    register struct pending *thispend;
| | +  int nfiles_requested;
| |
| |    program_name = argv[0];
| |    setlocale (LC_ALL, "");
| | @@ -901,7 +902,8 @@
| |
| |    clear_files ();
| |
| | -  if (i < argc)
| | +  nfiles_requested=argc - i;
| | +  if (nfiles_requested >= 0)

One tiny (but important :-) change:

The above `>=' should be just `>'.
Otherwise, `ls' with no arguments generates no output.

That will appear in fileutils-4.0.45 (note that 4.0.44 no longer exists :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]