From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5648 invoked from network); 6 Aug 2004 13:56:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Aug 2004 13:56:32 -0000 Received: (qmail 72049 invoked from network); 6 Aug 2004 13:56:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Aug 2004 13:56:27 -0000 Received: (qmail 11132 invoked by alias); 6 Aug 2004 13:56:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20232 Received: (qmail 11122 invoked from network); 6 Aug 2004 13:56:19 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 6 Aug 2004 13:56:19 -0000 Received: (qmail 66839 invoked from network); 6 Aug 2004 13:53:41 -0000 Received: from unknown (HELO mailsweeperjp.CSR.COM) (202.214.225.228) by a.mx.sunsite.dk with SMTP; 6 Aug 2004 13:53:39 -0000 Received: from exchangejp.csr.com (unverified) by mailsweeperjp.CSR.COM (Content Technologies SMTPRS 4.3.1) with ESMTP id for ; Fri, 6 Aug 2004 22:57:36 +0900 Received: from EXCHANGE02.csr.com ([192.168.137.45]) by exchangejp.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 6 Aug 2004 14:55:51 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 6 Aug 2004 14:54:48 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id i76DqSVc029064 for ; Fri, 6 Aug 2004 14:52:28 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id i76DqSVH029061 for ; Fri, 6 Aug 2004 14:52:28 +0100 Message-Id: <200408061352.i76DqSVH029061@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: zftp directory cache Date: Fri, 06 Aug 2004 14:52:28 +0100 From: Peter Stephenson X-OriginalArrivalTime: 06 Aug 2004 13:54:48.0218 (UTC) FILETIME=[EFE707A0:01C47BBC] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_40 autolearn=no version=2.63 X-Spam-Hits: -0.0 There's an ancient bug I've never got around to fixing that zfdir doesn't recognise directory changes and uses the old directory. Index: Functions/Zftp/zfcd =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfcd,v retrieving revision 1.2 diff -u -r1.2 zfcd --- Functions/Zftp/zfcd 8 May 2000 10:45:02 -0000 1.2 +++ Functions/Zftp/zfcd 6 Aug 2004 13:51:18 -0000 @@ -48,8 +48,11 @@ # if we want to keep it. local lastdir=$ZFTP_PWD -zftp cd "$@" && [[ $lastdir != $ZFTP_PWD ]] && -zfconfig[lastdir_$ZFTP_SESSION]=$lastdir +if zftp cd "$@" && [[ $lastdir != $ZFTP_PWD ]]; then + # Invalidate current directory listing. + rm -f zfconfig[curdir_$ZFTP_SESSION] + zfconfig[lastdir_$ZFTP_SESSION]=$lastdir +fi print $zfconfig[lastloc_$ZFTP_SESSION] # } -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************