diff --git a/plex/bin/plex-health b/plex/bin/plex-health index eaed72f..a2f546e 100755 --- a/plex/bin/plex-health +++ b/plex/bin/plex-health @@ -203,7 +203,9 @@ check_posters() { local sections sections="$(plex_get /library/sections)" local key title type code bad total - WORKDIR="$(mktemp -d)" + # Reuse the dir check_unmatched may already have made; overwriting WORKDIR + # here would orphan it, since cleanup only removes the last one. + [[ -n "$WORKDIR" ]] || WORKDIR="$(mktemp -d)" while IFS=$'\t' read -r key title type; do case "$type" in movie) code=1 ;;