From 4945755d53c227c94098444b9a36b664c57fda00 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 12 Nov 2012 17:10:02 +0100 Subject: [PATCH] unpack: don't assert if target file of a symlink doesn't exist, it may happen. --- lib/package_unpack.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/package_unpack.c b/lib/package_unpack.c index 9cc92bb6..13780b0f 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -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);