Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5404

Avoid creation of ~/.mongodb directory

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Plugins
    • None
    • 3

      This issue is related with https://jira.mongodb.org/browse/MONGOSH-1070

       
      Describe the bug
      Now the app is creating the directory ~/.mongodb instead of use ${XDG_CACHE_HOME}/mongodb/ or ${XDG_DATA_HOME}/mongodb/.
       

      To Reproduce
      Steps to reproduce the behavior:

      1. Open app

       

      Expected behavior
      That the app follows the XDG Base Directory Specification
       

      Additional context
      As side note in Linux $XDG_CACHE_HOME or $XDG_DATA_HOME may not be declared, in this case must fallback to /.cache and /.local respectively.

      For example in BASH (for $XDG_CACHE_HOME, $XDG_DATA_HOME is the same way:

      MONGODB_DIR=${XDG_CACHE_HOME:-~/.cache}/mongodb

      Or in Python:

      mongodb_dir = os.path.join(os.environ.get('XDG_CACHE_HOME', os.path.join(os.path.expanduser('~'), '.cache')), 'mongodb')

            Assignee:
            Unassigned Unassigned
            Reporter:
            e.gpl2.2.tid@telefonica.com Óscar García Amor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: