Merge pull request #5761 from yorickvP/fix-5741
extract_archive: fix "Hard-link target '...'" error
This commit is contained in:
commit
84497119ad
|
@ -93,9 +93,16 @@ static void extract_archive(TarArchive & archive, const Path & destDir)
|
||||||
else
|
else
|
||||||
archive.check(r);
|
archive.check(r);
|
||||||
|
|
||||||
archive_entry_set_pathname(entry,
|
archive_entry_copy_pathname(entry,
|
||||||
(destDir + "/" + name).c_str());
|
(destDir + "/" + name).c_str());
|
||||||
|
|
||||||
|
// Patch hardlink path
|
||||||
|
const char *original_hardlink = archive_entry_hardlink(entry);
|
||||||
|
if (original_hardlink) {
|
||||||
|
archive_entry_copy_hardlink(entry,
|
||||||
|
(destDir + "/" + original_hardlink).c_str());
|
||||||
|
}
|
||||||
|
|
||||||
archive.check(archive_read_extract(archive.archive, entry, flags));
|
archive.check(archive_read_extract(archive.archive, entry, flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue