diff --git a/lib/package_remove.c b/lib/package_remove.c index 67f13c71..57ea49bd 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -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 */