Skip to content

Commit eca3cf6

Browse files
committed
fix broken initialization of f_data_opts, don't clean STREAM_IS_PIPE flag
1 parent 74c6f5d commit eca3cf6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/inputs.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ open_data_stream(Options *opts)
623623
* in open time. But it doesn't look like robust solution.
624624
*/
625625
f_data = fopen(locpathname, mode);
626+
f_data_opts = 0;
626627
if (!f_data)
627628
{
628629
/* save errno, and prepare error message */
@@ -648,8 +649,6 @@ open_data_stream(Options *opts)
648649

649650
if (f_data)
650651
{
651-
f_data_opts = 0;
652-
653652
if (fstat(fileno(f_data), &statbuf) != 0)
654653
{
655654
current_state->_errno = errno;
@@ -823,6 +822,8 @@ open_data_stream(Options *opts)
823822
void
824823
close_data_stream(void)
825824
{
825+
//leave("close file");
826+
826827
if (close_f_data)
827828
{
828829
fclose(f_data);

0 commit comments

Comments
 (0)