From 4f41d6eefc1073df6b0d98e10220f7a97696efb6 Mon Sep 17 00:00:00 2001 From: Danny Tsai Date: Wed, 14 Aug 2024 14:40:44 +0800 Subject: [PATCH 1/2] Fix exFAT detection on macOS Fix exFAT detection on macOS --- MSET9_installer_script/mset9.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MSET9_installer_script/mset9.py b/MSET9_installer_script/mset9.py index 5afef42..386a639 100644 --- a/MSET9_installer_script/mset9.py +++ b/MSET9_installer_script/mset9.py @@ -503,7 +503,7 @@ def print_root(self): prinfo("might also be ios entitlement issue") prinfo("please install ldid or fix your python manually") prinfo("(require entitlement com.apple.private.security.disk-device-access)") - elif "Invalid" in msg: + elif "Invalid" in msg or "bytes per sector" in msg: prbad("Error 15: Not FAT32 formatted or corrupted filesystem.") prinfo("Please ensure your SD card is properly formatted") prinfo("Consult: https://wiki.hacks.guide/wiki/Formatting_an_SD_card") From 4c231d8c5ebfea3dcb2e28e9b3ca99db1874fbff Mon Sep 17 00:00:00 2001 From: Danny Tsai Date: Wed, 28 Aug 2024 00:13:50 +0800 Subject: [PATCH 2/2] Try to fix tmp update checking --- MSET9_installer_script/mset9.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MSET9_installer_script/mset9.py b/MSET9_installer_script/mset9.py index 386a639..236e236 100644 --- a/MSET9_installer_script/mset9.py +++ b/MSET9_installer_script/mset9.py @@ -168,7 +168,10 @@ def run_diskutil_and_wait(command, dev): if dirname.startswith(tmpprefix): dirpath = f"{systmp}/{dirname}" script = f"{dirpath}/mset9.py" - if os.path.exists(script) and os.stat(script).st_mtime > os.stat(thisfile).st_mtime: + tmp_st = os.stat(script) + this_st = os.stat(thisfile) + # hope file size is enough fix... checksum is a bit heavy i assume + if os.path.exists(script) and tmp_st.st_mtime > this_st.st_mtime and tmp_st.st_size == this_st.st_size: tmpdir = dirpath break else: