At present, the file as backed up only when the plugin is activated. To protect against data loss due to file corruption, the todo.txt should be copied regularly instead. I propose copying after every modification.
Also, maybe I should look into a better way to asynchronously read and write from a file safely. If I can do 'the right thing', then I might start actually using the plugin.
Google Drive, where I store my todo.txt, keeps previous versions of the file for up to 30 days (unless I choose to keep a revision forever). I think this is good enough for me, so I will deprioritize this issue.
At present, the file as backed up only when the plugin is activated. To protect against data loss due to file corruption, the
todo.txt
should be copied regularly instead. I propose copying after every modification.Also, maybe I should look into a better way to asynchronously read and write from a file safely. If I can do 'the right thing', then I might start actually using the plugin.
This issue refers to the following TODO:
https://github.com/jmanuel1/todoer/blob/e759e3999d6971e88586fd5e20efaff7ca416b8e/lib/main.es6#L60