summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2014-02-16 18:27:55 (EST)
committer Paul Barker <paul@paulbarker.me.uk>2014-03-18 08:35:07 (EDT)
commit7e54927e01a160c44670f44200ad6782b30dc2c4 (patch)
treee310bcfb474dc908befc98002359dafb4ba583b5 /libopkg
parent8c438cacdfa3742922f94f81d756383e71d49226 (diff)
opkg_remove: Differentiate between dirs and symlinks to dirs
Calling rmdir() on a symlink to a directory won't work so check whether something is a symlink before adding to to the list of installed dirs. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_remove.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
index 5f4219b..34f9154 100644
--- a/libopkg/opkg_remove.c
+++ b/libopkg/opkg_remove.c
@@ -360,7 +360,7 @@ remove_data_files_and_list(pkg_t *pkg)
/* File may have been claimed by another package. */
continue;
- if (file_is_dir(file_name)) {
+ if (!file_is_symlink(file_name) && file_is_dir(file_name)) {
str_list_append(&installed_dirs, file_name);
continue;
}