mirror of https://github.com/flysand7/ciabatta.git
fix file double close
This commit is contained in:
parent
08c8efe47b
commit
47e185a1aa
|
@ -305,10 +305,13 @@ int fclose(FILE *stream) {
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
if(stream->temp) {
|
if(stream->temp) {
|
||||||
BOOL err = DeleteFileA(stream->temp_name);
|
BOOL ok = DeleteFileA(stream->temp_name);
|
||||||
free(stream->temp_name);
|
free(stream->temp_name);
|
||||||
return err;
|
if(!ok) {
|
||||||
|
return EOF;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
_file_untrack(stream);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue