[gem.appimage] improvement: manual installation: adding generic file filter extension (.*) since some desktop environments filters are case sensitive

This commit is contained in:
Vinicius Moreira
2021-08-23 09:59:32 -03:00
parent db0e24e2be
commit 098675aa27
2 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.9.19]
### Improvements
- AppImage
- manual installation: adding generic file filter extension (.*) since some desktop environments filters are case sensitive (https://github.com/vinifmor/bauh/issues/185)[#185]
### Fixes
- AppImage
- manual installation: not generating desktop entries for AppImage files providing empty .desktop files (https://github.com/vinifmor/bauh/issues/186)[#186]

View File

@@ -98,7 +98,7 @@ class AppImageManager(SoftwareManager):
def install_file(self, root_password: str, watcher: ProcessWatcher) -> bool:
file_chooser = FileChooserComponent(label=self.i18n['file'].capitalize(),
allowed_extensions={'AppImage'},
allowed_extensions={'AppImage', '*'},
search_path=get_default_manual_installation_file_dir())
input_name = TextInputComponent(label=self.i18n['name'].capitalize())
input_version = TextInputComponent(label=self.i18n['version'].capitalize())
@@ -118,7 +118,7 @@ class AppImageManager(SoftwareManager):
components=[form],
confirmation_label=self.i18n['proceed'].capitalize(),
deny_label=self.i18n['cancel'].capitalize()):
if not file_chooser.file_path or not os.path.isfile(file_chooser.file_path):
if not file_chooser.file_path or not os.path.isfile(file_chooser.file_path) or not file_chooser.file_path.lower().strip().endswith('.appimage'):
watcher.request_confirmation(title=self.i18n['error'].capitalize(),
body=self.i18n['appimage.custom_action.install_file.invalid_file'],
deny_button=False)