Set $TMPPREFIX only when $TMPDIR is set

This commit is contained in:
Sorin Ionescu 2012-09-03 14:43:01 -04:00
parent 227043938f
commit e8226dfaf3
1 changed files with 5 additions and 3 deletions

View File

@ -94,8 +94,10 @@ unset path_file
# Temporary Files
#
export TMPPREFIX="${TMPDIR%/}/zsh"
if [[ ! -d "$TMPPREFIX" ]]; then
mkdir -p "$TMPPREFIX"
if [[ -d "$TMPDIR" ]]; then
export TMPPREFIX="${TMPDIR%/}/zsh"
if [[ ! -d "$TMPPREFIX" ]]; then
mkdir -p "$TMPPREFIX"
fi
fi