[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: branches/KDE/3.5/kdelibs/kioslave/http
From: David Faure <faure () kde ! org>
Date: 2005-12-28 12:41:20
Message-ID: 200512281341.20345.faure () kde ! org
[Download RAW message or body]
On Wednesday 28 December 2005 12:00, Hamish Rodda wrote:
> On Wednesday 28 December 2005 21:38, David Faure wrote:
> > On Wednesday 28 December 2005 11:22, Hamish Rodda wrote:
> > > On Wednesday 28 December 2005 20:57, David Faure wrote:
> > > > On Wednesday 28 December 2005 09:40, Hamish Rodda wrote:
> > > > > SVN commit 491966 by rodda:
> > > > >
> > > > > When uploading files to a webdav(s) URL, stat the file first to make
> > > > > sure it doesn't already exist.
> > > > >
> > > > > I would have expected this check to be within kio, but oh well,
> > > > > what's an extra round trip anyway...
> > > >
> > > > Right, KIO::CopyJob does check if the destination exists first.
> > > >
> > > > So I'm surprised by this... but I'm not sure I have a webdav account
> > > > somewhere to even check what the problem is.
> > > > I guess you checked already that HTTPProtocol::davStatList returns
> > > > ERR_DOES_NOT_EXIST correctly?
> > >
> > > That's just it, the file exists, so if it was to be stat-ed, it would
> > > return the correct entry.
> >
> > Oh sorry, I was confused. I see.
> >
> > > I looked at why the ftp ioslave works while the webdav slave doesn't, and
> > > found that the ftp ioslave first returns ERR_FILE_ALREADY_EXIST from
> > > put(), which then invokes the overwrite/rename dialog. Are you sure the
> > > check is within copyjob?
> >
> > Right; it's not. We don't stat each and every destination (only the overall
> > destination directory), it would be far too slow. So we do expect put() to
> > return ERR_FILE_ALREADY_EXIST when that's the case, indeed. Your fix is
> > correct then.
>
> ... which is still a shame because there are an extra O(n) round trips
> generated by it. If kio could do a list() and use that information where
> there are enough files in a directory to make it worthwhile, that would be
> good for webdav. Maybe something to think about for 4?
I disagree. For some protocols it would actually make things slower.
We were talking about using more caching though (e.g. the KDirListerCache),
and this would fit into it.
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic