[appimage] -> improvement: manual file upgrade -> auto-filling version and settings default search path to '~/Downloads'

This commit is contained in:
Vinicius Moreira
2020-08-11 18:16:50 -03:00
parent 69f83ac6da
commit adb0459ae2
3 changed files with 21 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import os
from pathlib import Path
from typing import Optional
from bauh.api.constants import CONFIG_PATH
from bauh.commons import resource
@@ -16,3 +17,8 @@ SYMLINKS_DIR = '{}/.local/bin'.format(str(Path.home()))
def get_icon_path() -> str:
return resource.get_path('img/appimage.svg', ROOT_DIR)
def get_default_manual_installation_file_dir() -> Optional[str]:
default_path = '{}/Downloads'.format(str(Path.home()))
return default_path if os.path.isdir(default_path) else None