mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[appimage] improvement: validating the AppImage file extension when updating imported files
This commit is contained in:
@@ -162,7 +162,8 @@ class AppImageManager(SoftwareManager):
|
||||
components=[FormComponent(label='', components=[file_chooser, input_version], spaces=False)],
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user