You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating two simultaneous editor windows by calling jrnl and closing them one after the other, only the entry from the window that was closed last will be added to the journal file. The other entry is lost.
micahellison
changed the title
Entries lost with multiple simultaneous editor sessions
Creating new entries with multiple simultaneous jrnl processes overwrites journal
Dec 12, 2020
It looks like this was a regression caused by #799 .
The fix for this issue without regressing #799 is to move the password prompt back. We should prompt for a password (for encrypted journals) after writing a new entry. If the user fails their password 3 times, though, we should send them back to the editor with their content intact instead of dying and losing the new entry.
This way, we can fix both issues without more regressions.
Bug Report
Environment
Installed through Archlinux package
community/jrnl
.Current Behavior
When creating two simultaneous editor windows by calling
jrnl
and closing them one after the other, only the entry from the window that was closed last will be added to the journal file. The other entry is lost.Expected Behavior
Both entries are added to the journal file.
Repro Steps
Config file:
jrnl
. The editor (Vim) opens. Type "closed last", but don’t close the editor.jrnl
again in another terminal window. A second instance of Vim opens. Type "closed first".[Entry added to default journal]
[Journal 'default' created at /home/living/jrnl.txt] [Entry added to default journal]
Now,
jrnl.txt
only contains the entry “closed last”. The other entry is lost.This happens also with existing journal files, not only with a newly created one as described above.
The text was updated successfully, but these errors were encountered: