unpack: don't assert if target file of a symlink doesn't exist, it may happen.

This commit is contained in:
Juan RP 2012-11-12 17:10:02 +01:00
parent a6c979295f
commit 4945755d53

View File

@ -441,15 +441,13 @@ unpack_archive(struct xbps_handle *xhp,
* Check if current link from binpkg hasn't been
* modified, otherwise extract new link.
*/
if (file_exists) {
buf = realpath(entry_pname, NULL);
assert(buf);
buf = realpath(entry_pname, NULL);
if (buf) {
if (strcmp(xhp->rootdir, "/")) {
p = buf;
p += strlen(xhp->rootdir);
} else
p = buf;
assert(p);
tgtlnk = find_pkg_symlink_target(filesd,
entry_pname);
assert(tgtlnk);