From 8f7cdbfa368a5db3589d913d5969df0c364e4466 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 17 Jun 2019 14:31:54 -0300 Subject: [PATCH] Cleaning .desktop file when installing --- aur/register_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aur/register_app.py b/aur/register_app.py index e6a5454c..eeaed2e4 100644 --- a/aur/register_app.py +++ b/aur/register_app.py @@ -22,13 +22,16 @@ Exec = /usr/bin/fpakman Icon = {resource_path}/resources/img/flathub_45.svg """.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): os.mkdir(apps_path) file_path = apps_path + '/fpakman.desktop' +if os.path.exists(file_path): + os.remove(file_path) + with open(file_path, 'w+') as f: f.write(desktop_file)