[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.0.29); erroneous error message: File is a symlink to a none
From: |
Kai Großjohann |
Subject: |
Re: tramp (2.0.29); erroneous error message: File is a symlink to a nonexistent target |
Date: |
Tue, 08 Apr 2003 17:10:27 +0200 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) |
Michael Albinus <address@hidden> writes:
> Michael Albinus <address@hidden> writes:
>
>> For me, everything is fine now except the case of a symlink to a
>> symlink to a directory on a remote host, which should be a rare case.
>
> With the patch below (instead of the one I've posted last night) even
> this works now for me:
I missed the word "instead of". Argh. Sorry.
> home/albinus> diff -u ange-ftp.el.orig ange-ftp.el
> --- ange-ftp.el.orig Fri Apr 4 23:32:20 2003
> +++ ange-ftp.el Sat Apr 5 15:02:57 2003
> @@ -3356,9 +3356,14 @@
> (ange-ftp-real-insert-file-contents filename visit beg end replace))))
>
> (defun ange-ftp-expand-symlink (file dir)
> - (if (file-name-absolute-p file)
> - (ange-ftp-replace-name-component dir file)
> - (expand-file-name file dir)))
> + (let ((res (if (file-name-absolute-p file)
> + (ange-ftp-replace-name-component dir file)
> + (expand-file-name file dir))))
> + (if (file-symlink-p res)
> + (ange-ftp-expand-symlink
> + (ange-ftp-get-file-entry res)
> + (file-name-directory (directory-file-name res)))
> + res)))
>
> (defun ange-ftp-file-symlink-p (file)
> ;; call ange-ftp-expand-file-name rather than the normal
> @@ -3370,11 +3375,8 @@
> (gethash
> (ange-ftp-get-file-part file)
> (ange-ftp-get-files (file-name-directory file)))))
> - (if (stringp file-ent)
> - (if (file-name-absolute-p file-ent)
> - (ange-ftp-replace-name-component
> - (file-name-directory file) file-ent)
> - file-ent)))
> + (and (stringp file-ent)
> + file-ent))
> (ange-ftp-real-file-symlink-p file)))
>
> (defun ange-ftp-file-exists-p (name)
>
>> Kai: could you, please, verify this, and commit the ange-ftp patch to
>> CVS if you agree?
So I tested the patch above, and it seems to work!
However, I observe the following. I do C-x d on the directory
/ftp:address@hidden:/home/kai/tmp/ange-ftp-test. It shows me a
symlink y pointing to /tmp. I hit f on that symlink. I get a new
dired buffer that has
/ftp:address@hidden:/home/kai/tmp/ange-ftp-test/y as the header line,
but I was expecting /ftp:address@hidden:/tmp.
Of course, this is only a minor thing, and it's not clear whether the
bug is in Ange-FTP or Tramp or my expectations!
--
A preposition is not a good thing to end a sentence with.
Re: tramp (2.0.29); erroneous error message: File is a symlink to a nonexistent target, Kai Großjohann, 2003/04/05
Re: tramp (2.0.29); erroneous error message: File is a symlink to a nonexistent target, Kai Großjohann, 2003/04/06