Use platformdirs to find user configuration files

The previous library we were using for this (`appdirs`) is dead upstream
and not supported anymore in debian testing.

Fixes #1058
This commit is contained in:
Alexis Métaireau 2025-01-23 12:34:41 +01:00
parent c2841dcc08
commit 6ae91b024e
No known key found for this signature in database
GPG key ID: C65C7A89A8FFC56E
2 changed files with 6 additions and 3 deletions

View file

@ -5,11 +5,14 @@ import sys
import traceback
import unicodedata
import appdirs
try:
import platformdirs
except ImportError:
import appdirs as platformdirs
def get_config_dir() -> str:
return appdirs.user_config_dir("dangerzone")
return platformdirs.user_config_dir("dangerzone")
def get_resource_path(filename: str) -> str:

View file

@ -15,7 +15,7 @@ include = [
[tool.poetry.dependencies]
python = ">=3.9,<3.13"
click = "*"
appdirs = "*"
platformdirs = "*"
PySide6 = "^6.7.1"
PyMuPDF = "^1.23.3" # The version in Fedora 39
colorama = "*"