forked from lix-project/lix
extract_archive: use copy_pathname instead of set_pathname.
Libarchive documentation mentions that archive_entry_set_pathname expects us to keep the passed string alive, which we don't.
This commit is contained in:
parent
20b1290103
commit
be1055f2cc
|
@ -93,7 +93,7 @@ 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());
|
||||||
|
|
||||||
archive.check(archive_read_extract(archive.archive, entry, flags));
|
archive.check(archive_read_extract(archive.archive, entry, flags));
|
||||||
|
|
Loading…
Reference in a new issue