libxbps: remove dangling symlinks properly.
This fixes removal of packages that contain multiple levels of dangling symlinks, i.e faenza-icon-theme and probably others. Close #23
This commit is contained in:
committed by
Duncan Overbruck
parent
56aa77d51b
commit
9e2c00ee8b
@@ -190,7 +190,10 @@ remove_pkg_files(struct xbps_handle *xhp,
|
||||
bool found;
|
||||
|
||||
xbps_dictionary_get_cstring_nocopy(obj, "file", &file);
|
||||
snprintf(path, sizeof(path), "%s/%s", xhp->rootdir, file);
|
||||
if (strcmp(xhp->rootdir, "/") == 0)
|
||||
snprintf(path, sizeof(path), "%s", file);
|
||||
else
|
||||
snprintf(path, sizeof(path), "%s%s", xhp->rootdir, file);
|
||||
|
||||
if ((strcmp(key, "files") == 0) ||
|
||||
(strcmp(key, "conf_files") == 0)) {
|
||||
|
||||
Reference in New Issue
Block a user