[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp/ange-ftp problem when copying into directory shown in dired bu
From: |
Stefan |
Subject: |
Re: tramp/ange-ftp problem when copying into directory shown in dired buffer |
Date: |
Mon, 06 Dec 2004 07:57:52 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) |
>> The problem seems to be that dired-insert-directory wants to insert
>> the file xxx.txt into the remote dired buffer, and instructs tramp to
>> do so by doing a
>>
>> insert-directory("xxx.txt" "--dired -ald" nil nil)
>>
>> This is not handled correctly by tramp/ange-ftp however, as it tries to
>> cd to xxx.txt as if it was a directory.
> It reminds me that a similar problem has been reported months ago:
> <http://thread.gmane.org/gmane.emacs.tramp/1586>, 3rd article in
> thread and following.
Yes, this is due to my change of revision 1.33 (2002/05/20) which was
introduced to work around the following problems IIRC:
- in wuftpd, `ls -opts /foo/bar/.' returns an empty list (rather than an
error) if /foo/bar is not a directory. So in order to discover whether
/foo/bar is a directory or a file, we try to cd to it.
- in netbsd's ftpd, the `ls' command can only take one argument: either
`ls -opts' or `ls /foo/bar'. So we pass the two args in two steps:
first `cd /foo/bar' then `ls -opts'.
I.e. the current code poses problem for your insert-directory case (where
you use insert-directory to insert a single file's data) with every ftpd
servers, but removing my workaround will break ange-ftp completely
(i.e. even the most basic operation like visiting file /foo/bar fails) for
some ftpd servers.
As for how to reconcile the two, it seems that the `mls' ftp command is the
answer (that's why I've added it to etc/TODO).
Stefan