2022-05-05 08:11:41 +12:00
|
|
|
from pathlib import Path
|
|
|
|
|
2022-02-17 12:04:53 +13:00
|
|
|
from PyQt5.QtCore import QStandardPaths
|
|
|
|
|
2022-05-05 08:11:41 +12:00
|
|
|
resources_path = Path(__file__).absolute().parent.parent.joinpath("resources")
|
|
|
|
data_dir = Path(QStandardPaths.writableLocation(QStandardPaths.DataLocation), "rare")
|
|
|
|
cache_dir = Path(QStandardPaths.writableLocation(QStandardPaths.CacheLocation), "rare")
|
|
|
|
image_dir = data_dir.joinpath("images")
|
|
|
|
tmp_dir = cache_dir.joinpath("tmp")
|
2022-02-17 12:04:53 +13:00
|
|
|
|
2022-04-05 09:21:23 +12:00
|
|
|
for path in (data_dir, cache_dir, image_dir, tmp_dir):
|
2022-05-05 08:11:41 +12:00
|
|
|
if not path.exists():
|
|
|
|
path.mkdir(parents=True)
|