about summary refs log tree commit diff
path: root/Functions/Zftp/zfrglob
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Zftp/zfrglob')
-rw-r--r--Functions/Zftp/zfrglob10
1 files changed, 3 insertions, 7 deletions
diff --git a/Functions/Zftp/zfrglob b/Functions/Zftp/zfrglob
index fad0c3849..535cb8006 100644
--- a/Functions/Zftp/zfrglob
+++ b/Functions/Zftp/zfrglob
@@ -57,14 +57,10 @@ else
     rm -f $tmpf
   else
     # we just have to do an ls and hope that's right
+    local fcache_name
+    zffcache
     nondir=$pat
-    if (( $#zftp_fcache == 0 )); then
-      # Why does `zftp_fcache=($(zftp ls))' sometimes not work?
-      zftp ls >$tmpf
-      zftp_fcache=($(<$tmpf))
-      rm -f $tmpf
-    fi
-    files=($zftp_fcache)
+    files=(${(P)fcache_name})
   fi
   # now we want to see which of the $files match $nondir:
   # ${...:/foo} deletes occurrences of foo matching a complete word,