From 199581f7803795a521be0d37c462fd7c3a6506a1 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Fri, 9 Jan 2015 22:37:22 -0800 Subject: 34202: safe tempfile creation part 3 -- use zf_ln instead of mv --- Completion/compinstall | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Completion/compinstall') 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 -- cgit 1.4.1