mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[fix] not verifying if an icon path is a file
# Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -27,11 +27,10 @@ from bauh.gems.appimage.config import read_config
|
||||
from bauh.gems.appimage.model import AppImage
|
||||
from bauh.gems.appimage.worker import DatabaseUpdater
|
||||
|
||||
HOME_PATH = str(Path.home())
|
||||
DB_APPS_PATH = '{}/{}'.format(HOME_PATH, '.local/share/bauh/appimage/apps.db')
|
||||
DB_RELEASES_PATH = '{}/{}'.format(HOME_PATH, '.local/share/bauh/appimage/releases.db')
|
||||
DB_APPS_PATH = '{}/{}'.format(str(Path.home()), '.local/share/bauh/appimage/apps.db')
|
||||
DB_RELEASES_PATH = '{}/{}'.format(str(Path.home()), '.local/share/bauh/appimage/releases.db')
|
||||
|
||||
DESKTOP_ENTRIES_PATH = '{}/.local/share/applications'.format(HOME_PATH)
|
||||
DESKTOP_ENTRIES_PATH = '{}/.local/share/applications'.format(str(Path.home()))
|
||||
|
||||
RE_DESKTOP_EXEC = re.compile(r'Exec\s*=\s*.+\n')
|
||||
RE_DESKTOP_ICON = re.compile(r'Icon\s*=\s*.+\n')
|
||||
@@ -298,7 +297,7 @@ class AppImageManager(SoftwareManager):
|
||||
|
||||
file_path = out_dir + '/' + file_name
|
||||
downloaded = self.file_downloader.download(file_url=pkg.url_download, watcher=watcher,
|
||||
output_path=file_path, cwd=HOME_PATH)
|
||||
output_path=file_path, cwd=str(Path.home()))
|
||||
|
||||
if downloaded:
|
||||
watcher.change_substatus(self.i18n['appimage.install.permission'].format(bold(file_name)))
|
||||
|
||||
@@ -342,8 +342,9 @@ class AppsTable(QTableWidget):
|
||||
|
||||
item.setText(name)
|
||||
|
||||
if self.disk_cache and pkg.model.supports_disk_cache() and pkg.model.get_disk_icon_path() and os.path.exists(pkg.model.get_disk_icon_path()):
|
||||
with open(pkg.model.get_disk_icon_path(), 'rb') as f:
|
||||
icon_path = pkg.model.get_disk_icon_path()
|
||||
if self.disk_cache and pkg.model.supports_disk_cache() and icon_path and os.path.isfile(icon_path):
|
||||
with open(icon_path, 'rb') as f:
|
||||
icon_bytes = f.read()
|
||||
pixmap = QPixmap()
|
||||
pixmap.loadFromData(icon_bytes)
|
||||
|
||||
Reference in New Issue
Block a user