--- groff-1.18.1.1.orig/contrib/groffer/groffer.sh +++ groff-1.18.1.1/contrib/groffer/groffer.sh @@ -3228,17 +3228,12 @@ do if is_not_empty "$d"; then if obj d is_dir && obj d is_writable; then - _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}"; - if obj _TMP_DIR is_dir; then - rm -f "${_TMP_DIR}"/*; + _TMP_DIR="$(mktemp -d "${d}/${_PROGRAM_NAME}.XXXXXX")" + if test $? = 0; then break; else - mkdir "${_TMP_DIR}"; - if obj _TMP_DIR is_not_dir; then - _TMP_DIR=''; - continue; - fi; - break; + _TMP_DIR=''; + continue; fi; fi; if obj _TMP_DIR is_not_writable; then