about summary refs log tree commit diff
path: root/Functions/Zftp/zftype
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-12-27 23:59:29 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-12-27 23:59:29 -0800
commit200accac63deae99eb9656b26363c85648bd6748 (patch)
treebd0461e34cb47f0f4f26e339efbc5cda479b0c2b /Functions/Zftp/zftype
parent1cd802357096b60561b1a50c0c23ab357bbc0de3 (diff)
downloadzsh-200accac63deae99eb9656b26363c85648bd6748.tar.gz
zsh-200accac63deae99eb9656b26363c85648bd6748.tar.xz
zsh-200accac63deae99eb9656b26363c85648bd6748.zip
34067: safe tempfile creation, part 1
Diffstat (limited to 'Functions/Zftp/zftype')
-rw-r--r--Functions/Zftp/zftype6
1 files changed, 2 insertions, 4 deletions
diff --git a/Functions/Zftp/zftype b/Functions/Zftp/zftype
index 0cdf7e2aa..81f95dece 100644
--- a/Functions/Zftp/zftype
+++ b/Functions/Zftp/zftype
@@ -1,13 +1,11 @@
 # function zftype {
-local type zftmp=${TMPPREFIX}zftype$$
+local type
 [[ $curcontext = :zf* ]] || local curcontext=:zftype
 
 zfautocheck -d
 
 if (( $# == 0 )); then
-  zftp type >$zftmp
-  type=$(<$zftmp)
-  rm -f $zftmp
+  type=$(zftp type)
   if [[ $type = I ]]; then
     print "Current type is image (binary)"
     return 0