Fixing bug which causes tar to close stdin

Fixing bug which causes tar to close stdin when running with the flag -T with "-" (reading input from stdin)
pull/10/head
Blondy314 2018-05-12 20:16:08 +03:00 committed by GitHub
parent d80eecb868
commit 9950a5a442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -744,7 +744,11 @@ static llist_t *append_file_list_to_list(llist_t *list)
*cp = '\0';
llist_add_to_end(&newlist, line);
}
fclose(src_stream);
if(src_stream != stdin)
{
fclose(src_stream);
}
}
return newlist;
}