Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid data loss by postponing open() (jrnl-org#502) (jrnl-org#545)
Postpone the reading of existing entries until a new entry has been obtained and is ready to be appended to the journal. This patch reduces the likelihood of losing entries when the user has launched concurrent jrnl sessions to add multiple entries. A proper solution would require locking the journal file for the time between reading and writing, but this is already good enough for typical interactive use cases.
- Loading branch information