abricotine icon indicating copy to clipboard operation
abricotine copied to clipboard

Find a standard way to handle default assets

Open brrd opened this issue 9 years ago • 0 comments

Some assets are stored in the user config directory in order to be customizable, but what happens if for some reason user deletes them (or replace them with corrupted files)? Default values must be stored in a "safe" place.

Right now we use different solutions depending of assets:

  • Spell checker dictionaries are loaded from user directory only (no fall back position).
  • Default template is stored in Abricotine source. Additional templates are stored in config.
  • (upcoming) Default translations are hard coded.
  • (upcoming) Default theme is stored in Abricotine source. Additional templates are stored in config.

We should use a standard way to handle all defaults. My idea:

  1. Check if the target file exists in user directory and use it if it does...
  2. Otherwise look for the default file in user directory...
  3. Otherwise use the default file in default/ dir (which necessarily exists).

brrd avatar Jun 22 '16 09:06 brrd