Commit 64a85ec6 authored by Natanael Copa's avatar Natanael Copa

fetch: do not create hardlinks to softlinks but to softlink targets

Otherwise the iso image will have softlinks which is not what we want
parent cd5d44fa
......@@ -90,7 +90,9 @@ static int fetch_package(struct fetch_ctx *fctx,
fd = STDOUT_FILENO;
} else {
if ((fctx->flags & FETCH_LINK) && apk_url_local_file(infile)) {
if (link(infile, outfile) == 0)
char real_infile[256];
readlink(infile, real_infile, sizeof(real_infile));
if (link(real_infile, outfile) == 0)
return 0;
}
fd = creat(outfile, 0644);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment