GNOME Bugzilla – Bug 747556
Using Owncloud as a storage eats data
Last modified: 2018-01-23 04:25:08 UTC
This happened with a couple of notes now: * Use ownCloud as the storage * Write a new note in GNOME Notes. * Come back the next day, discover that the note is empty * Go to the ownCloud web ui, verify it's empty there too. * Revert the file to an earlier version of the note in the web ui. This version has all the text in it.
Do you use ownCloud Client (appart from Bijiben)? This has importance because the way Bijiben works depends on this.
an ownCloud client on the laptop? Nope. Do you recommend I install one?
(In reply to Andreas Nilsson from comment #2) > an ownCloud client on the laptop? Nope. > Do you recommend I install one? I needed to know in order to investigate the right code. Bijiben is supposed to work on both cases.
Ok so I tried with ownCloud Client off to work directly with remote storage (webdav). Editing a note, renaming, quitting, at first seemed fine. Then I tried to edit and leave Bijiben few after editing. "Bingo", the note is 0 octet : the file is opened but time misses to write it. the call in biji-own-cloud-note.c is <g_file_replace_content_async> func, https://developer.gnome.org/gio/stable/GFile.html#g-file-replace-contents-async. Doc says "no copy of content will be made, so it must stay valid until callback is called." While in this case callback is not that important (it does update icon + tracker), this probably means leaving the application will free the content and make the writing fail. I shall either follow the advice to use g-file-replace-contents-bytes-async, which seems to imply g_string_free_to_bytes. Or, I might probably protect the note content until callback is called.
*** This bug has been marked as a duplicate of bug 786239 ***