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

Otherwise the iso image will have softlinks which is not what we want
cute-signatures
Natanael Copa 2009-06-11 08:39:51 +00:00
parent cd5d44fa9d
commit 64a85ec65d
1 changed files with 3 additions and 1 deletions

View File

@ -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);