Thanks a lot for the report and patch.
I like this one :-)
and have applied it and added a test case based on your example.
Because of this, there will be at least one more test release
before fileutils-4.1.0.
ftp://alpha.gnu.org/gnu/fetish/
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)
| dir_defaulted = 0;
| for (; i < argc; i++)
| {
| @@ -929,7 +931,7 @@
| if (pending_dirs)
| DIRED_PUTCHAR ('\n');
| }
| - else if (pending_dirs && pending_dirs->next == 0)
| + else if (nfiles_requested <= 1 && pending_dirs && pending_dirs->next == 0)
| print_dir_name = 0;
|
| while (pending_dirs)
|
|
_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils