mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 15:34:15 +02:00
[appimage] fix -> some installed applications cannot be launched by their desktop entries
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
__version__ = '0.9.10'
|
||||
__version__ = '0.9.11'
|
||||
__app_name__ = 'bauh'
|
||||
|
||||
import os
|
||||
|
||||
@@ -26,10 +26,16 @@ def replace_desktop_entry_exec_command(desktop_entry: str, appname: str, file_pa
|
||||
cmd = RE_MANY_SPACES.sub(' ', exec_groups[1].strip())
|
||||
if cmd:
|
||||
words = cmd.split(' ')
|
||||
changed = False
|
||||
|
||||
for idx in range(len(words)):
|
||||
if words[idx].lower() == treated_name:
|
||||
words[idx] = '"{}"'.format(file_path)
|
||||
changed = True
|
||||
break
|
||||
|
||||
if not changed:
|
||||
words = ['"{}"'.format(file_path)]
|
||||
|
||||
final_entry = final_entry.replace(full_match, full_match.replace(exec_groups[1], ' '.join(words)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user