• Edênis Freindorfer Azevedo's avatar
    Bug 818686 - XDG Base Directory Specification support with fallback, r=mt · 7f21d4f4
    Edênis Freindorfer Azevedo authored
    Summary:
    We check if $HOME/.pki and $HOME/.pki/nssdb exist; if they do, then we use
    this path. Otherwise, use ${XDG_DATA_HOME:-$HOME/.local/share}/pki/nssdb
    
    Test Plan:
    Create dummy empty dir and set HOME to it. Then, check if getUserDb returns:
    1. $HOME/.pki/nssdb when this path exists;
    2. $HOME/.local/share/pki/nssdb when $HOME/.pki/nssdb does not and XDG_DATA_HOME is not defined;
    3. $XDG_DATA_HOME/pki/nssdb when $HOME/.pki/nssdb does not exist and XDG_DATA_HOME is defined.
    
    Reviewers: mt
    
    Reviewed By: mt
    
    Bug #: 818686
    
    Differential Revision: https://phabricator.services.mozilla.com/D14007
    
    --HG--
    extra : source : 45f82855824be40a6a2b74632dda5e9e6f89a5d0
    7f21d4f4
manifest.mn 697 Bytes