Skip to content

Commit

Permalink
bee-remove: Fix removal of files with special chars in filename
Browse files Browse the repository at this point in the history
fixes issue #152
  • Loading branch information
mariux committed Aug 29, 2012
1 parent 404fb61 commit 1e0dbd3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/bee-remove.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,14 @@ function do_remove() {

run_hooks pre-remove ${pkg} ${BEE_METADIR}/${pkg}/CONTENT.bee-remove

FILES=( $(bee-cache --tmpinstall "${pkg}" print-uniq-files "${pkg}") )

# removing files
for f in "${FILES[@]}" ; do
if [ -d "${f}" -a ! -h "$f" ] ; then
rmdir ${OPT_VERBOSE:+-v} ${f}
# remove files that are uniq to the package..
while read f ; do
if [ -d "${f}" -a ! -h "${f}" ] ; then
rmdir ${OPT_VERBOSE:+-v} "${f}"
else
rm -f ${OPT_VERBOSE:+-v} ${f}
rm -f ${OPT_VERBOSE:+-v} "${f}"
fi
done
done < <(bee-cache --tmpinstall "${pkg}" print-uniq-files "${pkg}")

run_hooks post-remove ${pkg} ${BEE_METADIR}/${pkg}/CONTENT.bee-remove

Expand Down

0 comments on commit 1e0dbd3

Please sign in to comment.