Skip to content

Commit d633daf

Browse files
committed
Fixes #1160: add-bookmark-site plugin should follow XDG dirs
1 parent 56a859f commit d633daf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/add-bookmark-site.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#
2323

2424
import os
25+
from pathlib import Path
2526
import gi
2627

2728
gi.require_version('Gtk', '3.0')
@@ -32,8 +33,9 @@
3233
UI_FILE_PATH = os.path.join(os.path.dirname(__file__), "add-bookmark-site.ui")
3334

3435
""" get some good config file name """
35-
config_dir = os.path.expandvars(
36-
"$HOME/.config/liferea/plugins/add-bookmark-site")
36+
config_path = "liferea/plugins/add-bookmark-site"
37+
config_dir = os.getenv('XDG_CONFIG_HOME', Path.joinpath(Path.home(), ".config"))
38+
config_dir = Path.joinpath(Path(config_dir), config_path)
3739
config_fname = os.path.join(config_dir, "add-bookmark-site.ini")
3840

3941

0 commit comments

Comments
 (0)