ref: b7c6aefd78e4d03f7f0d37968504137e067006c7
parent: a6846d9088435b0318207241dd85350fa05668d5
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Feb 22 10:20:43 EST 2018
[ar] Fix extract() It was closing the input file which was closed in doit().
--- a/ar/main.c
+++ b/ar/main.c
@@ -275,7 +275,7 @@
while (siz-- > 0 && (c = getc(m->src)) != EOF)
putc(c, fp);
fflush(fp);
- if (fclose(m->src) == EOF || ferror(fp))
+ if (fclose(fp) == EOF)
goto error_file;
/* TODO: set attributes */