crypti / ccoin

:part_alternation_mark: Convert and fetch the cost of over 1000 cryptocurrencies within your terminal, and save repeated queries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Profiles are deleted after reinstall or update of ccoin

radiovisual opened this issue · comments

Currently, the profiles are saved in a file called profiles.json, which sits in the module's root directory, so when the module is updated, it brings in a fresh (empty) version of the profiles.json file, which effectively deletes any existing profiles.

To solve this, we would either need to write an export/import feature, or save the profile data somewhere outside of the module directory (this gets my vote).

I won't have time to write this for awhile, but it shouldn't be too hard if someone wants to send in a PR.

I guess we could just store the profiles in the user's home directory, like so many other apps do. require('os').homedir()