summaryrefslogtreecommitdiffstats
path: root/scripts/pacman-optimize.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pacman-optimize.sh.in')
-rw-r--r--scripts/pacman-optimize.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in
index 5ff302e2..154f982e 100644
--- a/scripts/pacman-optimize.sh.in
+++ b/scripts/pacman-optimize.sh.in
@@ -113,7 +113,7 @@ fi
# do not let pacman run while we do this
touch "$lockfile"
-workdir=$(mktemp -d /tmp/pacman-optimize.XXXXXXXXXX) ||
+workdir=$(mktemp -d "${TMPDIR:-/tmp}/pacman-optimize.XXXXXXXXXX") ||
die_r "$(gettext "Can not create temp directory for database building.")\n" >&2
# step 1: sum the old db