summaryrefslogtreecommitdiff
path: root/Functions/Zftp/zfuput
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:32:59 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-05-05 23:58:59 +0200
commitdb38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch)
treedaa342d423febbd3a5a7ef97053037677fab004a /Functions/Zftp/zfuput
parent01eea47617a6e06debdb4330f92ae69f92089fd2 (diff)
parent3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff)
downloadzsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz
zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Functions/Zftp/zfuput')
-rw-r--r--Functions/Zftp/zfuput15
1 files changed, 8 insertions, 7 deletions
diff --git a/Functions/Zftp/zfuput b/Functions/Zftp/zfuput
index 4e0e42dcd..f4e6a0fd6 100644
--- a/Functions/Zftp/zfuput
+++ b/Functions/Zftp/zfuput
@@ -12,7 +12,7 @@
emulate -L zsh
[[ $curcontext = :zf* ]] || local curcontext=:zfuput
-local loc rem locstats remstats doit tmpfile=${TMPPREFIX}zfuput$$
+local loc rem locstats remstats doit
local rstat opt opt_v opt_s
integer stat do_close
@@ -52,12 +52,13 @@ for rem in $*; do
stat=1
continue
fi
- zftp local $loc >$tmpfile
- locstats=($(<$tmpfile))
- zftp remote $rem >$tmpfile
- rstat=$?
- remstats=($(<$tmpfile))
- rm -f $tmpfile
+ () {
+ zftp local $loc >|$1
+ locstats=($(<$1))
+ zftp remote $rem >|$1
+ rstat=$?
+ remstats=($(<$1))
+ } =(<<<'temporary file')
if [[ $rstat = 2 ]]; then
print "Server does not implement full command set required." 1>&2
return 1