slaveBase::copy between differing url hosts

Waldo Bastian bastian at kde.org
Fri Feb 4 15:47:15 GMT 2005


On Friday 04 February 2005 13:00, Mike 'Mike' Jones wrote:
> Hi,
>
> I've been writing a kio slave.  The protocol I'm implementing, gsiftp,
> supports the movement of data from one URL to another URL without the data
> passing through the client machine, so-called third party file transfer.
>
> I'm using KDE 3.1.4 and have overloaded the slaveBase::copy function so
> that at this stage it alerts me to the fact that it has been called.
>
> When I drag and drop between two Konqueror windows pointing to two
> differing sites the copy routine is never called, instead both get and
> push are called (which, contrary to all the documentation I can find,
> should only happen if copy is not implemented).
>
> I noticed a post to this list in 2000 which states that KIO::fileCopyJob
> handles this, could it be that KIO::fileCopyJob assumes that copy cannot
> take place between two differing remote virtual filesystems?  If so, is it
> possible to change this behaviour, or is there a straight forward
> workaround I could try?

Yes, KIO::fileCopyJob assumes that copy cannot take place between two 
differing remote virtual filesystems. We have an optional exception in place 
for remote-to/from-local copying, by specifying "copyToFile=true" and 
"copyFromFile=true" in the .protocol file (See ftp.protocol)

We could add a similar option for copying between different hosts (that's what 
you are interested in, right?) but not before KDE 4 I'm afraid.

A work around could be to use URL's that do not actually contain the host-name 
in that part of the URL that is reserved for that. Of course I don't know if 
that's an option for you.

The decission whether to use put/get or copy is made in 
FileCopyJob::startBestCopyMethod() (At least in KDE 3.3)

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050204/f4de771b/attachment.sig>


More information about the kde-core-devel mailing list