diff --git a/misc/tools.func b/misc/tools.func index 109e87e5f..bfe6cba96 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2542,7 +2542,7 @@ _deploy_source_tarball() { mkdir -p "$target" if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then - find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete + find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf -- fi tar --no-same-owner -xzf "$tarball" -C "$workdir" || { @@ -2631,7 +2631,7 @@ _deploy_unpacked_archive() { # was truncated, the archive was unreadable, or it unpacked to nothing. mkdir -p "$target" if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then - find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete + find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf -- fi if ! cp -r "$source_dir"/* "$target/"; then @@ -9372,7 +9372,7 @@ fetch_and_deploy_from_url() { mkdir -p "$directory" if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then - find "${directory:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete + find "${directory:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf -- fi local unpack_tmp