! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
detect external changes to ~/.local/share/notes/ (for sync purposes)
Status:
RESOLVED: WORKSFORME
Product:
Xfce4-notes-plugin
Component:
General

Comments

Description Liv 2012-09-11 12:06:27 CEST
It seems that Notes is unable to detect external modifications to the ~/.local/share/notes/ text files. 

To replicate: create a new note, populate it with 'hello world', wait for ~60sec for Notes to create/save the relevant text file in ~/.local/share/notes/, open that text file in a text editor, add 'asdf', save the file. You should notice that although the underlying text file contains 'asdf', the Notes window doesn't display it. The only way (I've found) to detect the changes is to close Notes/remove the panel plugin and restart Notes. 

This is a problem when using an external program (e.g. SpiderOak) to sync notes between computers. What happens is that the notes get saved on Computer 1, SpiderOak backs them up automatically to its servers, I close down C1, open C2, Notes open with the _old_ version of the notes, then SpiderOak on C2 checks the files on its servers and detects a newer latest version of the notes, and subsequently it downloads the latest notes to C2. Since Notes doesn't detect external changes, it still operates with the old notes, and this is a recipe for data loss. (It can always be reverted via SpiderOak, but it gets messy. 

Would you consider implementing polling for external modifications of text files and automatic reloading from disk of the notes? Perhaps with a confirmation dialogue: 'Cancel/Keep old notes', 'Reload notes from disk'?
Comment 1 Mike Massonnet editbugs 2012-10-25 03:30:25 CEST
git master has support for monitoring changes on notes. Although it monitors changes only on existing notes, it doesn't try to detect new files but there is a trick -> create new files, then make a small change on an existing note to be able to reload the group, for example with the command touch.

If there is a refresh needed, e.g. there has been an external change, the notes won't overwrite the data on disk.

It's been a while in git, but there wasn't any new release since quite some time (>900 days actually.)
Comment 2 Mike Massonnet editbugs 2012-10-25 04:07:48 CEST
> >900 days actually
*less than 900 days actually

:-)
Comment 3 Liv 2012-10-28 09:29:41 CET
(In reply to comment #1)
> git master has support for monitoring changes on notes. Although it monitors
> changes only on existing notes, it doesn't try to detect new files but there
> is a trick -> create new files, then make a small change on an existing note
> to be able to reload the group, for example with the command touch.
> 
> If there is a refresh needed, e.g. there has been an external change, the
> notes won't overwrite the data on disk.
> 
Thanks for the info!


> It's been a while in git, but there wasn't any new release since quite some
> time (>900 days actually.)
> 
I think that this bug and Bug 6766 largely warrant a new release. It would be nice to have one in less than the next 900 days. :)

Bug #9283

Reported by:
Liv
Reported on: 2012-09-11
Last modified on: 2012-10-28

People

Assignee:
Mike Massonnet
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information