refactor(KIAUH): use pathlib instead of os where possible. consistent use of pathlib.

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2023-12-25 00:59:00 +01:00
parent da533fdd67
commit 8aeb01aca0
23 changed files with 207 additions and 209 deletions

View File

@@ -9,9 +9,8 @@
# This file may be distributed under the terms of the GNU GPLv3 license #
# ======================================================================= #
from os.path import join, dirname, abspath
from pathlib import Path
APPLICATION_ROOT = dirname(dirname(abspath(__file__)))
KIAUH_CFG = join(APPLICATION_ROOT, "kiauh.cfg")
KIAUH_BACKUP_DIR = f"{Path.home()}/kiauh-backups"
APPLICATION_ROOT = Path(__file__).resolve().parent.parent
KIAUH_CFG = APPLICATION_ROOT.joinpath("kiauh.cfg")
KIAUH_BACKUP_DIR = Path.home().joinpath("kiauh-backups")