Fixed: incorrect `find ... -exec mv ...` for FreeBSD.

Thanks to GerryM @https://forum.iredmail.org/
This commit is contained in:
Zhang Huangbin 2021-04-30 10:35:00 +08:00
parent 9564d62dc1
commit 4ccde0bb33
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ done
# If there're a lot files, direct `mv` command may fail with error like
# `argument list too long`, so we need `find` in this case.
if [[ X"${KERNEL_NAME}" == X'OPENBSD' ]]; then
if [[ X"${KERNEL_NAME}" == X'OPENBSD' ]] || [[ X"${KERNEL_NAME}" == X'FREEBSD' ]]; then
[[ -d ${SPOOL_SPAM_DIR} ]] && find ${SPOOL_SPAM_DIR} -name '*.eml' -exec mv {} ${SPOOL_LEARN_SPAM_DIR}/ \;
[[ -d ${SPOOL_HAM_DIR} ]] && find ${SPOOL_HAM_DIR} -name '*.eml' -exec mv {} ${SPOOL_LEARN_HAM_DIR}/ \;
else