[api] refactoring: temp dir now follow the patter /tmp/bauh@vinicius

This commit is contained in:
Vinicius Moreira
2021-11-24 10:46:39 -03:00
parent aa889dcd51
commit 83cc7cc134
7 changed files with 9 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
from getpass import getuser
from pathlib import Path
from bauh import __app_name__
@@ -7,4 +8,4 @@ CACHE_PATH = f'/var/cache/{__app_name__}' if user.is_root() else f'{Path.home()}
CONFIG_PATH = '{}/.config/bauh'.format(str(Path.home()))
USER_THEMES_PATH = '{}/.local/share/bauh/themes'.format(str(Path.home()))
DESKTOP_ENTRIES_DIR = '{}/.local/share/applications'.format(str(Path.home()))
TEMP_DIR = '/tmp/bauh{}'.format('_root' if user.is_root() else '')
TEMP_DIR = f'/tmp/{__app_name__}@{getuser()}'