mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 17:54:15 +02:00
Cleaning .desktop file when installing
This commit is contained in:
@@ -22,13 +22,16 @@ Exec = /usr/bin/fpakman
|
|||||||
Icon = {resource_path}/resources/img/flathub_45.svg
|
Icon = {resource_path}/resources/img/flathub_45.svg
|
||||||
""".format(resource_path=local_resources_path)
|
""".format(resource_path=local_resources_path)
|
||||||
|
|
||||||
apps_path = '{}/.local/share/applications'.format(str(Path.home()))
|
apps_path = share_path + '/applications'
|
||||||
|
|
||||||
if not os.path.exists(apps_path):
|
if not os.path.exists(apps_path):
|
||||||
os.mkdir(apps_path)
|
os.mkdir(apps_path)
|
||||||
|
|
||||||
file_path = apps_path + '/fpakman.desktop'
|
file_path = apps_path + '/fpakman.desktop'
|
||||||
|
|
||||||
|
if os.path.exists(file_path):
|
||||||
|
os.remove(file_path)
|
||||||
|
|
||||||
with open(file_path, 'w+') as f:
|
with open(file_path, 'w+') as f:
|
||||||
f.write(desktop_file)
|
f.write(desktop_file)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user