From 58dbdc168ec23aeac66f056f39d5e8ee1291bef3 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Fri, 23 Apr 1999 11:32:53 +0000 Subject: [PATCH] It is _never_ good idea to ignore errors. People than expect everything is going ok. Ok, I've now limited number of "could not parse" error messages to 5 per session. Lower this limit if it makes you crazy, but DO NOT REMOVE those messages. --- vfs/ChangeLog | 1 + vfs/vfs.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index feddaf0f4..6a08de59c 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -2,6 +2,7 @@ * vfs.c (vfs_parse_filemode): fix for solaris which uses 'l' instead of 'S'. + (vfs_parse_ls_lga): do not silently ignore parsing errors. Wed Apr 21 21:59:50 1999 Norbert Warmuth diff --git a/vfs/vfs.c b/vfs/vfs.c index ad1ddabce..6df7e5d78 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -1736,9 +1736,15 @@ vfs_parse_ls_lga (char *p, struct stat *s, char **filename, char **linkname) return 1; error: -#if 0 - message_1s (1, "Could not parse:", p_copy); -#endif + { + static int errorcount = 0; + + if (++errorcount < 5) { + message_1s (1, "Could not parse:", p_copy); + } else if (errorcount == 5) + message_1s (1, "More parsing errors will be ignored.", "(sorry)" ); + } + if (p_copy != p) /* Carefull! */ g_free (p_copy); return 0;