From 55d4d67f1ceb5927498542c7941624d233ab5a66 Mon Sep 17 00:00:00 2001
From: kirbylife <kirbylife@protonmail.com>
Date: Mon, 13 Mar 2023 13:46:04 -0600
Subject: [PATCH] Make pyright happy and fix logging file

---
 Makefile                    | 4 ++--
 dat/harbour-muchkin.desktop | 4 +++-
 src/main.py                 | 8 +++++---
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 32638f8..3bd99b3 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,8 @@ prefix:=/usr
 temp:=/tmp/fpm-jolla
 sourcePath:=$(shell pwd)
 dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
-version:=0.5.0
-iteration:=9
+version:=0.4.5
+iteration:=5
 
 all: clean build-tmp rpm-i686 rpm-jolla rpm-aarch64
 
diff --git a/dat/harbour-muchkin.desktop b/dat/harbour-muchkin.desktop
index 0e9d05e..d9154de 100644
--- a/dat/harbour-muchkin.desktop
+++ b/dat/harbour-muchkin.desktop
@@ -5,4 +5,6 @@ Name=Muchkin
 Icon=harbour-muchkin
 Exec=sailfish-qml harbour-muchkin
 [X-Sailjail]
-Sandboxing=Disabled
\ No newline at end of file
+Sandboxing=Disabled
+OrganizationName=org.kirbylife
+ApplicationName=harbour-muchkin
\ No newline at end of file
diff --git a/src/main.py b/src/main.py
index 236a4e5..b2058da 100644
--- a/src/main.py
+++ b/src/main.py
@@ -1,4 +1,4 @@
-import pyotherside
+import pyotherside  # pyright: ignore reportMissingImports
 from PIL import Image, ImageDraw, ImageChops
 from PIL.Image import Image as ImageType
 from io import BytesIO
@@ -10,11 +10,13 @@ import os
 import shutil
 import logging
 
-logging_filename = os.path.join(os.getenv("HOME"),
+logging_filename = os.path.join(os.path.expanduser("~"),
                                 ".local",
                                 "share",
-                                "org.git.kirbylife.harbour-muchkin",
+                                "org.kirbylife",
+                                "harbour-muchkin",
                                 "muchkin.log")
+os.makedirs(os.path.dirname(logging_filename), exist_ok=True)
 logging.basicConfig(filename=logging_filename, filemode="w", level=logging.DEBUG)
 
 def download_icon(url) -> ImageType: