# HG changeset patch # User Michael Albinus # Date 1264782205 -3600 # Node ID 28bc861d56c522aad43ee862e2095d77feb96a3f # Parent 3809515a97b573b5423af9e9a0e2255e05866aa5 * net/tramp.el (tramp-handle-insert-directory): Handle also symlinks, when FILENAME is not in `default-directory'. diff -r 3809515a97b5 -r 28bc861d56c5 lisp/ChangeLog --- a/lisp/ChangeLog Fri Jan 29 16:03:25 2010 +0200 +++ b/lisp/ChangeLog Fri Jan 29 17:23:25 2010 +0100 @@ -1,7 +1,12 @@ +2010-01-29 Michael Albinus + + * net/tramp.el (tramp-handle-insert-directory): Handle also + symlinks, when FILENAME is not in `default-directory'. + 2010-01-28 Michael Albinus * net/ange-ftp.el (ange-ftp-insert-directory): Handle the case, - FILENAME is not in `default-directory'. (Bug#5478) + FILE is not in `default-directory'. (Bug#5478) * net/tramp.el (tramp-handle-insert-directory): Simplify handling of SWITCHES. Handle the case, FILENAME is not in diff -r 3809515a97b5 -r 28bc861d56c5 lisp/net/tramp.el --- a/lisp/net/tramp.el Fri Jan 29 16:03:25 2010 +0200 +++ b/lisp/net/tramp.el Fri Jan 29 17:23:25 2010 +0100 @@ -4147,6 +4147,8 @@ ;; The inserted file could be from somewhere else. (when (and (not wildcard) (not full-directory-p)) (goto-char (point-max)) + (when (file-symlink-p filename) + (goto-char (search-backward "->" beg 'noerror))) (search-backward (if (zerop (length (file-name-nondirectory filename))) "."