diff options
-rw-r--r-- | src/tee.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -204,7 +204,8 @@ tee (int nfiles, const char **files) /* Close the files, but not standard output. */ for (i = 1; i <= nfiles; i++) - if (descriptors[i] && fclose (descriptors[i]) != 0) + if (!STREQ (files[i], "-") + && descriptors[i] && fclose (descriptors[i]) != 0) { error (0, errno, "%s", files[i]); ok = false; |