summaryrefslogtreecommitdiff
path: root/src/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 43e4dbf..3bb7934 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -175,9 +175,13 @@ static int fetch_package(apk_hash_item item, void *pctx)
}
r = apk_istream_splice(is, fd, pkg->size, progress_cb, ctx);
- is->close(is);
- if (fd != STDOUT_FILENO)
+ if (fd != STDOUT_FILENO) {
+ struct apk_file_meta meta;
+ is->get_meta(is, &meta);
+ apk_file_meta_to_fd(fd, &meta);
close(fd);
+ }
+ is->close(is);
if (r != pkg->size) {
unlinkat(ctx->outdir_fd, filename, 0);