[Top][All Lists]

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

Re: ange-ftp errors out for some directories

From: lawrence mitchell
Subject: Re: ange-ftp errors out for some directories
Date: Sun, 03 Aug 2003 02:28:09 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50

Richard Stallman wrote:

>     I finally got round to debugging this properly, it turned out
>     that both dired-actual-switches and the dired buffer were being
>     reset in ange-ftp-insert-directory.  Specifically,
>     file-symlink-p seemed to do the resetting.

> It is certainly a bug if file-symlink-p does that.  Can you find out
> where within file-symlink-p that resetting happens?

> I would guess it occurs inside of ange-ftp-file-symlink-p, which I
> would guess is handling the operation in this case, so you could first
> try debugging inside there.

The sequence of events is this:

Invoke dired: C-x d /ftp:homepages.demon.co.uk:~/


ange-ftp-file-symlink-p -> ange-ftp-get-files -> ange-ftp-ls ->
ange-ftp-send-cmd -> ange-ftp-error

Now, ange-ftp-error is, obviously, meant to be a terminal error.
However, in the case where the parent directory is not readable,
it isn't (at least now that there's a condition-case in

ange-ftp-error does this:

(let ((cur (selected-window)))
   (select-window cur))

Now, at the time selected-window is called, it evaluates to
whatever the current window was /before/ invoking dired.

Now, the (file-error nil) part of the condition-case kicks in,
ange-ftp-file-symlink-p returns nil, and we continue, with
dired-actual-switches having been reset, and (current-buffer)
returning the "incorrect" value.

I suppose one way of avoiding this problem would be to call
ange-ftp-get-files with the optional NOERROR argument.  But this
seems like a bad solution, since one wouldn't get an error in
"correct" cases.

lawrence mitchell <address@hidden>

reply via email to

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