mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
[api.paths] refactoring: CACHE_PATH renamed to CACHE_DIR
This commit is contained in:
@@ -2,7 +2,7 @@ from abc import ABC, abstractmethod
|
||||
from enum import Enum
|
||||
from typing import List, Optional
|
||||
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_DIR
|
||||
|
||||
|
||||
class CustomSoftwareAction:
|
||||
@@ -146,7 +146,7 @@ class SoftwarePackage(ABC):
|
||||
"""
|
||||
:return: base cache path for the specific app type
|
||||
"""
|
||||
return f'{CACHE_PATH}/{self.get_type()}'
|
||||
return f'{CACHE_DIR}/{self.get_type()}'
|
||||
|
||||
def can_be_updated(self) -> bool:
|
||||
"""
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from bauh import __app_name__
|
||||
from bauh.api import user
|
||||
|
||||
CACHE_PATH = f'/var/cache/{__app_name__}' if user.is_root() else f'{Path.home()}/.cache/{__app_name__}'
|
||||
CACHE_DIR = f'/var/cache/{__app_name__}' if user.is_root() else f'{Path.home()}/.cache/{__app_name__}'
|
||||
CONFIG_DIR = f'/etc/{__app_name__}' if user.is_root() else f'{Path.home()}/.config/{__app_name__}'
|
||||
USER_THEMES_DIR = f'/usr/share/{__app_name__}/themes' if user.is_root() else f'{Path.home()}/.local/share/{__app_name__}/themes'
|
||||
DESKTOP_ENTRIES_DIR = '{}/.local/share/applications'.format(str(Path.home()))
|
||||
|
||||
Reference in New Issue
Block a user