]> code.delx.au - gnu-emacs/blobdiff - lisp/net/tramp-ftp.el
(date, entry, number, original-date): Add defvars.
[gnu-emacs] / lisp / net / tramp-ftp.el
index c81e49bf77c22f547b9bbbafb4023420770e1e35..53cc392ad7ab84a4619028ffc83c7374ac37fbc2 100644 (file)
@@ -1,8 +1,8 @@
-;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*-
+;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
 
-;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-;; Author: Michael Albinus <Michael.Albinus@alcatel.de>
+;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
-;; Convenience functions for calling Ange-FTP (and maybe EFS, later on)
-;; from Tramp.  Most of them are displaced from tramp.el.
+;; Convenience functions for calling Ange-FTP from Tramp.
+;; Most of them are displaced from tramp.el.
 
 ;;; Code:
 
@@ -98,9 +98,16 @@ pass to the OPERATION."
           (list (nth 0 tramp-file-name-structure)
                 (nth 3 tramp-file-name-structure)
                 (nth 2 tramp-file-name-structure)
-                (nth 4 tramp-file-name-structure))))
+                (nth 4 tramp-file-name-structure)))
+         ;; ange-ftp uses `ange-ftp-ftp-name-arg' and `ange-ftp-ftp-name-res'
+         ;; for optimization in `ange-ftp-ftp-name'. If Tramp wasn't active,
+         ;; there could be incorrect values from previous calls in case the
+         ;; "ftp" method is used in the Tramp file name. So we unset
+         ;; those values.
+         (ange-ftp-ftp-name-arg "")
+         (ange-ftp-ftp-name-res nil))
       (cond
-       ;; If argument is a symlink, 'file-directory-p` and 'file-exists-p`
+       ;; If argument is a symlink, `file-directory-p' and `file-exists-p'
        ;; call the traversed file recursively. So we cannot disable the
        ;; file-name-handler this case.
        ((memq operation '(file-directory-p file-exists-p))