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 /Completion/compinstall | |
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 'Completion/compinstall')
-rw-r--r-- | Completion/compinstall | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/compinstall b/Completion/compinstall index ae94993d6..2f99d270d 100644 --- a/Completion/compinstall +++ b/Completion/compinstall @@ -3,6 +3,8 @@ emulate -L zsh setopt extendedglob +zmodload -m -F zsh/files b:zf_ln || return 1 + local key local compcontext=-default- @@ -1958,8 +1960,8 @@ if [[ -z $ifile || -d $ifile ]] || fi local tmpout=${TMPPREFIX:-/tmp/zsh}compinstall$$ -mv -f =(<<<'') $tmpout && # safe tempfile creation -mv -f =(<<<'') ${tmpout}x || return 1 +zf_ln -fn =(<<<'') $tmpout && # safe tempfile creation +zf_ln -fn =(<<<'') ${tmpout}x || return 1 # # Assemble the complete set of lines to |