]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(du_files): Ignore any failure of fts_close.
authorJim Meyering <jim@meyering.net>
Sat, 4 Oct 2003 19:56:32 +0000 (19:56 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 4 Oct 2003 19:56:32 +0000 (19:56 +0000)
src/du.c

index b9d9f4d952195a94500210b95e015f2b9a1e12a7..7bbc5fc1a055617e08c61f2725d49293de0b14de 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -519,11 +519,10 @@ du_files (char **files, int bit_flags)
       process_file (fts, ent);
     }
 
-  if (fts_close (fts) < 0)
-    {
-      error (0, errno, "closing FTS handle");
-      fail = 1;
-    }
+  /* Ignore failure, since the only way it can do so is in failing to
+     return to the original directory, and since we're about to exit,
+     that doesn't matter.  */
+  fts_close (fts);
 
   if (print_totals)
     print_size (tot_size, _("total"));