Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from hashlib import md5
from pathlib import Path
from shutil import rmtree
import os

import gi

Expand Down Expand Up @@ -45,8 +46,8 @@ def __init__(self):
self.username = userhome.split("/")[-1]
except:
self.username = ""
self.cachedir = userhome + "/.cache/pardus-software/"
self.configdir = userhome + "/.config/pardus-software/"
self.cachedir = os.getenv("XDG_CACHE_HOME", userhome + "/.cache") + "/pardus-software/"
self.configdir = os.getenv("XDG_CONFIG_HOME", userhome + "/.config") + "/pardus-software/"

self.error_message = ""
self.connection = False
Expand Down
3 changes: 2 additions & 1 deletion src/UserSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import configparser
from pathlib import Path
import os

import distro

Expand All @@ -26,7 +27,7 @@ def __init__(self):
userhome = str(Path.home())
self.username = userhome.rsplit("/", maxsplit=1)[-1]

self.configdir = userhome + "/.config/pardus-software/"
self.configdir = os.getenv("XDG_CONFIG_HOME", userhome + "/.config") + "/pardus-software/"
self.configfile = "settings.ini"
self.config = configparser.ConfigParser(strict=False)
self.config_usi = None
Expand Down