diff options
author | Kai Großjohann <kgrossjo@eu.uu.net> | 2003-04-08 20:06:12 +0000 |
---|---|---|
committer | Kai Großjohann <kgrossjo@eu.uu.net> | 2003-04-08 20:06:12 +0000 |
commit | 83bbd71b252072c6b61d98c70f126c71876ae6cb (patch) | |
tree | f9070eaffbbb26076e1a5b96ad0d3990e21ed785 /lisp/net/tramp-ftp.el | |
parent | 4773b8ca2017459333c099838aef1635c4e32fa6 (diff) | |
download | emacs-83bbd71b252072c6b61d98c70f126c71876ae6cb.tar.gz |
Version 2.0.33 released.
Change coding cookie to `iso-2022-7bit' for XEmacs
compatibility. (From Steve Youngs <youngs@xemacs.org>.)
Diffstat (limited to 'lisp/net/tramp-ftp.el')
-rw-r--r-- | lisp/net/tramp-ftp.el | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 04f8bbeb323..1d2ab9083f9 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -94,18 +94,25 @@ pass to the OPERATION." (save-match-data (or (boundp 'ange-ftp-name-format) (require 'ange-ftp)) - (let* ((ange-ftp-name-format - (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))) - (inhibit-file-name-handlers - (list 'tramp-file-name-handler - 'tramp-completion-file-name-handler - (and (eq inhibit-file-name-operation operation) - inhibit-file-name-handlers))) - (inhibit-file-name-operation operation)) - (apply 'ange-ftp-hook-function operation args)))) + (let ((ange-ftp-name-format + (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)))) + (cond + ;; 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)) + (apply 'ange-ftp-hook-function operation args)) + ;; Normally, the handlers must be discarded + (t (let* ((inhibit-file-name-handlers + (list 'tramp-file-name-handler + 'tramp-completion-file-name-handler + (and (eq inhibit-file-name-operation operation) + inhibit-file-name-handlers))) + (inhibit-file-name-operation operation)) + (apply 'ange-ftp-hook-function operation args))))))) (defun tramp-ftp-file-name-p (filename) "Check if it's a filename that should be forwarded to Ange-FTP." @@ -127,10 +134,8 @@ pass to the OPERATION." ;; * In case of "/ftp:host:file" this works only for functions which ;; are defined in `tramp-file-name-handler-alist'. Call has to be -;; pretended in `tramp-file-name-handler' otherwise. Looks like -;; `ange-ftp-completion-hook-function' and `ange-ftp-hook-function' -;; are active temporarily in `file-name-handler-alist'. -;; Furthermore, there are no backup files on FTP hosts this case. +;; pretended in `tramp-file-name-handler' otherwise. +;; Furthermore, there are no backup files on FTP hosts. ;; Worth further investigations. ;;; tramp-ftp.el ends here |