[Top][All Lists]

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

Re: bug in copy-directory

From: Michael Albinus
Subject: Re: bug in copy-directory
Date: Tue, 08 Feb 2011 17:39:02 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

>> Technically, there might be no problem. But it is unclean to call a file
>> name handler in a function which is not intended for. And also the
>> parameter lists differ between copy-directory and copy-directory1.
> Not now, parameters are the same, last arg has been removed in both
> functions.
> now we have:
> (defun copy-directory (directory newname &optional keep-time parents)
> ...)
> (defun copy-directory-1 (directory newname &optional keep-time parents)
> ...)
>> It's just a feeling that this kind of hacks could cause trouble in the
>> future. However, if Chong/Stefan do not oppose, I'll shut up and make
>> the changes in Tramp and ange-ftp.el.
> So maybe you will have no changes to do.

Using your latest patches, I've tried

M-: (copy-directory "/ssh::/tmp/test" "/ssh::~/")

This results in a wrong target directory structure. This is, because
Tramp has no own implementation of copy-directory for the ssh method, it
falls back to the default implementation. So we have the call tree:

 -> copy-directory-1
 -> tramp-handle-copy-directory
 -> copy-directory

You see, there are serious problems when a file name handler is called
from a function which shouldn't.

M-: (copy-directory-1 "/ssh::/tmp/test" "/ssh::~/")

works fine. Given this behaviour, the file name handler should be
provided for copy-directory-1, which is just a helper function ...

Maybe it has been discussed at the beginning already, but I don't catch
what is wrong with using the implementation of copy-directory-1 for

Best regards, Michael.

reply via email to

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