You are browsing as a guest. Sign up (or log in) to start making projects!

54m 24s logged

Persistent storage works again

After almost an hour of coding I was able get persistent storage working again and fix a couple of bugs.

In the last devlog I explained that because of the project’s rewrite I disabled persistent storage. The project now asked for the user’s name and supported multiple todolists so the previous logic didn’t work.

I thankfully was able to reuse a lot of code from the last version(mostly the file handling stuff). Now the project stores data on disk this way:

  • One .cli-TODO-config.json file which contains the user’s name.
  • One .cli-TODO-data.json file which contains the slice of todolists in json.

Both files get stored in the same directory in which the program runs.

Bugs fixed:

  • When the user left a todolist view by clicking the title of that todo would still be displayed on the border. Not anymore.
  • Other minor bugs that mostly appeared during the development of persistent storage. Like closing a file too early(then, if I tried to write to it again it would crash the program and leave the terminal in a broken state).
0
2

Comments 0

No comments yet. Be the first!