Skip to content

Safe writes

ransome1 edited this page Aug 4, 2026 · 4 revisions

Version History:

  • Introduced in v2.0.26

Why it exists

Safe Writes ensures your todo data stays secure during file operations. It prevents corruption that could happen if something interrupts the writing process.

How it works

Whenever you add, edit, complete, or delete a todo, sleek performs a write operation. During this write:

  1. sleek writes your new changes to a .tmp file
  2. Confirms the .tmp file was successfully created
  3. Creates a .bak backup copy of your original file
  4. Replaces your original file with the .tmp file
  5. Automatically deletes both temporary files on success

If something goes wrong

sleek creates a .bak backup file containing your original data before replacing it.

  • Normal operation: Both .tmp and .bak files are automatically cleaned up after a successful write
  • If sleek crashes during the write: You might find a .bak file in your todo folder (e.g., todo.txt.bak)
  • What this means: The .bak file contains your original data. Your file is safe even if the crash interrupted the replacement
  • What to do: You can safely delete any .bak files manually

Disabling Safe Writes

⚠️ Safe Writes is enabled by default. However, you can disable it if you are experiencing issues during the write process in settings.

Clone this wiki locally