2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#1630] fix remove_if_exists not removing a file

This commit is contained in:
Andrei Pavel
2021-01-07 00:57:49 +02:00
parent 64ab207227
commit 3b54776fdb
2 changed files with 4 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ set -eu
kea_admin="@abs_top_builddir@/src/bin/admin/kea-admin" kea_admin="@abs_top_builddir@/src/bin/admin/kea-admin"
kea_lfc="@abs_top_builddir@/src/bin/lfc/kea-lfc" kea_lfc="@abs_top_builddir@/src/bin/lfc/kea-lfc"
# Clean up any files used in testing.
clean_up() { clean_up() {
remove_if_exists \ remove_if_exists \
"${config_file-}" \ "${config_file-}" \

View File

@@ -551,9 +551,10 @@ get_reconfigs() {
${_GET_RECONFIG_ERRORS##*[! ]} ${_GET_RECONFIG_ERRORS##*[! ]}
} }
# Remove the given directories or files if they exist.
remove_if_exists() { remove_if_exists() {
while test ${#} -gt 1; do while test ${#} -gt 0; do
if test -n "${1}"; then if test -e "${1}"; then
rm -rf "${1}" rm -rf "${1}"
fi fi
shift shift