tramp-devel
[Top][All Lists]
Advanced

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

Re: ange-ftp problem (was: ange-ftp-name-format needs to be improved)


From: Stefan Monnier
Subject: Re: ange-ftp problem (was: ange-ftp-name-format needs to be improved)
Date: 28 Jan 2004 09:46:20 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> Unfortunately, I noticed another problem on Tramp ftp.  Emacs
>> attempts to cd to a remote file, not a directory, after copying
>> a file from the local dired buffer to the remote dired buffer
>> using the C command.  It can be verified even if the remotehost
>> is `localhost'.  Here is a ftp session at that time:

I don't understand what problem you're seeing.
You say "attempts to cd to a remote file", but that is not in and of itself
a problem since it's internal to ange-ftp (the reason ange-ftp does it is
to figure out whether it's a file or a directory).
Are you saying the the ftp server gladly accepts to cd to a file rather
than report an error and that ange-ftp then does something wrong or report
some kind of error?  If so could you give us more details about the error
you're seeing ?

Looking at your ftp log it seems that the remote host does report an error
when we try to cd to /file.gz.  Maybe ange-ftp somehow doesn't recognize it?

> Of course, this is not the solution. I would appreciate if the
> ange-ftp maintainers could check what happens there.

As mentioned above, the purpose of the lines you removed is to do a cd to
figure out whether the thing is a file or a directory.  With the code you
used instead (i.e. the code used in Emacs-21.3 IIRC), the detetion is done
by using `ls <file>' instead of `cd <file>', but this sadly fails with some
ftp servers that gladly accept the `ls /file/gz' and just return
"total 1024\n" as if /file.gz were a directory with no entries at all (not
even . or ..).

The `cd <file>' trick is also used for another reason, but I can't quite
remember which it is.  I think it has to do with the fact that some ftp
servers did not like the `ls <file>' command we used (I seem to remember
something like `ls <file>' only worked if <file> had no spaces in it or
something like that, or that `ls <file>' works and `ls -l' works as well
but `ls -l <file>' doesn't).

In any case the log he showed indicates that using `cd <file>' should work,
but maybe ange-ftp does not properly parse the error returned by the ftp
server or maybe there's some other error somewhere.

Can someone give me a precise recipe ?


        Stefan




reply via email to

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