Jim Meyering <[EMAIL PROTECTED]> wrote:
| Stephane CHAZELAS <[EMAIL PROTECTED]> 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 :-)
_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils