1
0
Fork 0
mirror of synced 2024-05-20 12:32:50 +12:00

Use pathlib for resources path, to fix FileNotFoundError

This commit is contained in:
Dummerle 2022-04-10 14:24:41 +02:00
parent 0bb74197ce
commit 48562f6527
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1

View file

@ -1,8 +1,8 @@
import os
import pathlib
from PyQt5.QtCore import QStandardPaths
resources_path = os.path.join(os.path.dirname(__file__), "../resources/")
resources_path = pathlib.Path(__file__).absolute().parent.parent.joinpath("resources")
data_dir = os.path.join(QStandardPaths.writableLocation(QStandardPaths.DataLocation), "rare")
cache_dir = os.path.join(QStandardPaths.writableLocation(QStandardPaths.CacheLocation), "rare")
image_dir = os.path.join(data_dir, "images")