changeset 4808:53071486ff7a

Ignore file-too-large conditions when stat()ing a file for dired. The size isn't used anyway, but the mode is still filled in. Thanks to Henrique Martins for the patch. See the xemacs-patches thread beginning with message <8202.1261593067@monster.martins.cc>.
author Jerry James <james@xemacs.org>
date Thu, 07 Jan 2010 12:44:25 -0700
parents 41852ee5f1b0
children 0d3ccd5a2509 6ee5e50a8772
files src/ChangeLog src/dired.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 07 17:01:25 2010 +0000
+++ b/src/ChangeLog	Thu Jan 07 12:44:25 2010 -0700
@@ -1,3 +1,8 @@
+2010-01-07  Henrique Martins  <xemacs@martins.cc>
+
+	* dired.c (file_name_completion): If a file is too big to stat(),
+	ignore the error, since we don't use the size.
+
 2010-01-07  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mule-charset.c:
--- a/src/dired.c	Thu Jan 07 17:01:25 2010 +0000
+++ b/src/dired.c	Thu Jan 07 12:44:25 2010 -0700
@@ -371,8 +371,10 @@
 	      || 0 <= scmp (d_name, XSTRING_DATA (file), file_name_length))
 	    continue;
 
-          if (file_name_completion_stat (directory, dp, &st) < 0)
-            continue;
+	  /* Ignore file-too-large conditions; the mode is still filled in. */
+	  if (file_name_completion_stat (directory, dp, &st) < 0 &&
+	      errno != EOVERFLOW)
+	    continue;
 
           directoryp = ((st.st_mode & S_IFMT) == S_IFDIR);
           if (directoryp)