diff --git a/MSET9_installer_script/mset9.py b/MSET9_installer_script/mset9.py index 1647410..494292a 100644 --- a/MSET9_installer_script/mset9.py +++ b/MSET9_installer_script/mset9.py @@ -546,6 +546,7 @@ def print_root(self): scriptroot = os.path.dirname(thisfile) # I hate python ternary operator i hate python ternary operator systemroot = os.environ["SYSTEMDRIVE"] if osver == "Windows" else "/" # Never hardcode C:. My Windows drive letter is E:, my SD card or USB drive is often C:. + # Can't stat / on Windows or else we get the current drive if os.stat(scriptroot).st_dev == os.stat(systemroot).st_dev: prbad("Error 01: Script is not running on your SD card!") prinfo(f"Current location: {scriptroot}") @@ -625,10 +626,10 @@ def writeProtectCheck(): prgood("SD card is writeable!") # Section: SD card free space -# ensure 16MB free space -if not fs.ensurespace(16 * 1024 * 1024): +# The 3DS is making the files not us, so let's just make sure we're not at the brim of space left +if not fs.ensurespace(0x10000): # 64KiB #prbad(f"Error 06: You need at least 16MB free space on your SD card, you have {(freeSpace / 1000000):.2f} bytes!") - prbad("Error 06: You need at least 16MB free space on your SD card!") + prbad("Error 06: SD card is out of free space!") prinfo("Please free up some space and try again.") exitOnEnter()