tee: close "-" file

This is a cleanup to the previous commit v8.23-138-g7ceaf1d.

* src/tee.c (tee_files): Do not exempt the "-" file from being closed,
as this is no longer stdout but a normal file.
This commit is contained in:
Bernhard Voelker committed 2015-02-23 11:39:08 +01:00
1 parent 7ceaf1d975
commit 19d34d244b
1 file changed
+1 -2
+1 -2
View File
@@ -213,8 +213,7 @@ tee_files (int nfiles, const char **files)
/* Close the files, but not standard output. */
for (i = 1; i <= nfiles; i++)
if (!STREQ (files[i], "-")
&& descriptors[i] && fclose (descriptors[i]) != 0)
if (descriptors[i] && fclose (descriptors[i]) != 0)
{
error (0, errno, "%s", files[i]);
ok = false;