lib/package_remove.c: simplify link relative check.

This commit is contained in:
Juan RP 2014-10-25 10:32:58 +02:00
parent fa6f20ec4f
commit 5dba1108d1

View File

@ -111,7 +111,7 @@ symlink_target(struct xbps_handle *xhp, const char *path)
return NULL;
}
lnk[sb.st_size] = '\0';
if ((strncmp(lnk, "../", 3) == 0) || strchr(lnk, '/') == NULL) {
if (lnk[0] != '/') {
char *p, *dname;
/* relative */