1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 05:10:28 +02:00

34067: safe tempfile creation, part 1

This commit is contained in:
Barton E. Schaefer 2014-12-27 23:59:29 -08:00
parent 1cd8023570
commit 200accac63
15 changed files with 75 additions and 65 deletions

View file

@ -19,8 +19,5 @@ fi
if [[ $1 = -d ]]; then
unset $fcache_name
elif (( ${(P)#fcache_name} == 0 )); then
local tmpf=${TMPPREFIX}zffcache$$
zftp ls >$tmpf
eval "$fcache_name=(\${(f)\"\$(<\$tmpf)\"})"
rm -f $tmpf
eval "$fcache_name=(\${(f)\"\$(zftp ls)\"})"
fi