tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch fixes bug where TRAMP doesn't use ange-ftp when it should.


From: Francis Litterio
Subject: Patch fixes bug where TRAMP doesn't use ange-ftp when it should.
Date: Wed, 04 Jun 2003 21:49:34 -0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)

This patch (against the latest CVS sources) fixes a bug where TRAMP
doesn't fall back to ange-ftp when an matching entry in
tramp-default-method-alist specifies "ftp" as the method.

Whoever wrote tramp-find-foreign-file-name-handler, didn't realize that
dolist traverses the entire list, and doesn't stop part way through just
because the RESULT variable is set.

Hope this helps.
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.


--- tramp.el    31 May 2003 20:25:39 -0000      2.307
+++ tramp.el    5 Jun 2003 01:48:33 -0000
@@ -3420,9 +3420,14 @@
 (defun tramp-find-foreign-file-name-handler (filename)
   "Return foreign file name handler if exists."
   (when (tramp-tramp-file-p filename)
-    (let (elt res)
-      (dolist (elt tramp-foreign-file-name-handler-alist res)
+    (let (elt
+         res
+         (handler-alist tramp-foreign-file-name-handler-alist))
+      (while handler-alist
+       (setq elt (car handler-alist)
+             handler-alist (cdr handler-alist))
        (when (funcall (car elt) filename)
+         (setq handler-alist nil)
          (setq res (cdr elt))))
       res)))
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]