diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2015-01-09 22:37:22 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-01-10 10:32:31 -0800 |
commit | 199581f7803795a521be0d37c462fd7c3a6506a1 (patch) | |
tree | 55f5166b868c4dcb66777dbcd1d2c43a287f1cb6 /Functions/Zftp/zfget_match | |
parent | bd13ffefaba033321410f069c6fb32fab1b29fac (diff) | |
download | zsh-199581f7803795a521be0d37c462fd7c3a6506a1.tar.gz zsh-199581f7803795a521be0d37c462fd7c3a6506a1.tar.xz zsh-199581f7803795a521be0d37c462fd7c3a6506a1.zip |
34202: safe tempfile creation part 3 -- use zf_ln instead of mv
Diffstat (limited to 'Functions/Zftp/zfget_match')
-rw-r--r-- | Functions/Zftp/zfget_match | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Functions/Zftp/zfget_match b/Functions/Zftp/zfget_match index 3ba06c47a..3f2bbf30c 100644 --- a/Functions/Zftp/zfget_match +++ b/Functions/Zftp/zfget_match @@ -1,6 +1,7 @@ # function zfget_match { emulate -L zsh +zmodload -m -F zsh/files b:zf_ln || return 1 # the zfcd hack: this may not be necessary here if [[ $1 == $HOME || $1 == $HOME/* ]]; then @@ -10,8 +11,8 @@ fi if [[ $ZFTP_SYSTEM == UNIX* && $1 == */* ]]; then setopt localoptions clobber local tmpf=${TMPPREFIX}zfgm$$ - mv -f =(<<<'') $tmpf - + zf_ln -fn =(<<<'') $tmpf || return 1 + if [[ -n $WIDGET ]]; then local dir=${1:h} [[ $dir = */ ]] || dir="$dir/" |