Re: GVFS + LibreOffice + WebDAV



On Tue, 2012-12-04 at 12:23 +0000, Andrew Beverley wrote:
> On Tue, 2012-12-04 at 12:18 +0000, Andrew Beverley wrote:
> > On Tue, 2012-12-04 at 05:52 -0500, Adam Tauno Williams wrote:
> > > > I've just spent a while doing some debugging. The reason it doesn't work
> > > > is that there is no "append" method in the webdav code. So any attempts
> > > > to open a file for appending are met with the error "Operation not
> > > > supported by backend".
> > > > I see no reason why there couldn't be an append method, as there are
> > > > plenty of other webdav clients that appear to manage it. It just needs
> > > > someone to write one.
> > > Huh, every client I've seen sends the document in a single PUT
> > > operation, usually composed to a local temporary file first.
> > Yeah, I was just thinking about that today, and was thinking that a
> > cache may be the best way to achieve it. I had a look at the davfs2
> > program and it uses a cache. The downside is that it is probably a fair
> > bit of development, as the code to manage a cache would have to be
> > implemented.
> Hmmm, having just written that, I assume there must already be some sort
> of cache in order to pass the file to the application. I'll have a look
> when I get another chance.

I've no clue how GVFS handles it, but I've written that code before.

1. Open file in write mode 
  -> open scratch file, write mode, sparse
  -> LOCK target
2. Perform all operations to scratch file
3. Close file 
   -> flush the scratch file
   -> PUT the contents of the scratch file
   -> UNLOCK target

Depending on the platform / language it is more-or-less difficult.

Hmmm.... now I do wonder how GVFS does it.  The special ways in which
GVFS' WebDAV backend sucks might be explained here;  it generally
behaves as though it has no cache.

-- 
Adam Tauno Williams  GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA



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