From 6ca06fd2cd2e0e017746459c858df53eb24aea29 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Thu, 7 Apr 2022 16:29:46 +0300 Subject: [PATCH] minor start script correction --- start.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start.py b/start.py index 0abb8974..9707e441 100755 --- a/start.py +++ b/start.py @@ -6,19 +6,19 @@ def update_icon(): need_update = False icon_name = "DemonEditor.desktop" - with open(icon_name, "r") as f: + with open(icon_name, "r", encoding="utf-8") as f: lines = f.readlines() for i, line in enumerate(lines): if line.startswith("Icon="): icon_path = line.lstrip("Icon=") - current_path = "{}/app/ui/icons/hicolor/96x96/apps/demon-editor.png".format(os.getcwd()) + current_path = f"{os.getcwd()}/app/ui/icons/hicolor/96x96/apps/demon-editor.png" if icon_path != current_path: need_update = True - lines[i] = "Icon={}\n".format(current_path) + lines[i] = f"Icon={current_path}\n" break if need_update: - with open(icon_name, "w") as f: + with open(icon_name, "w", encoding="utf-8") as f: f.writelines(lines)