comparison src/dired.c @ 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 5998e37dc35e
children 16112448d484
comparison
equal deleted inserted replaced
4807:41852ee5f1b0 4808:53071486ff7a
369 if (! DIRENTRY_NONEMPTY (dp) 369 if (! DIRENTRY_NONEMPTY (dp)
370 || cclen < file_name_length 370 || cclen < file_name_length
371 || 0 <= scmp (d_name, XSTRING_DATA (file), file_name_length)) 371 || 0 <= scmp (d_name, XSTRING_DATA (file), file_name_length))
372 continue; 372 continue;
373 373
374 if (file_name_completion_stat (directory, dp, &st) < 0) 374 /* Ignore file-too-large conditions; the mode is still filled in. */
375 continue; 375 if (file_name_completion_stat (directory, dp, &st) < 0 &&
376 errno != EOVERFLOW)
377 continue;
376 378
377 directoryp = ((st.st_mode & S_IFMT) == S_IFDIR); 379 directoryp = ((st.st_mode & S_IFMT) == S_IFDIR);
378 if (directoryp) 380 if (directoryp)
379 { 381 {
380 #ifndef TRIVIAL_DIRECTORY_ENTRY 382 #ifndef TRIVIAL_DIRECTORY_ENTRY