Skip to content

Commit

Permalink
Fixed error in XDG Compliance
Browse files Browse the repository at this point in the history
This solves issue #87 that is related to XDG compliance.  The error was
related to cases where the XDG_DATA_HOME environment variable was defined.
In fact, if XDG_DATA_HOME was defined, then PATH_KB would be set to
$XDG_DATA_HOME and PATH_KB_GIT would be set to $XDG_DATA_HOME/.git,
rather than $XDG_DATA_HOME/kb and $XDG_DATA_HOME/kb/.git, respectively.
  • Loading branch information
gnebbia committed Jun 24, 2021
1 parent 3ca07f7 commit d144618
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from pathlib import Path
import toml

BASE_PATH = os.environ.get("XDG_DATA_HOME",Path(Path.home(),".local","share","kb"))
BASE_PATH = Path(os.environ.get("XDG_DATA_HOME",Path(Path.home(),".local","share")),"kb")


DEFAULT_CONFIG = {
"PATH_KB": str(Path(BASE_PATH)),
Expand Down

0 comments on commit d144618

Please sign in to comment.