Skip to content

Commit

Permalink
SD card storage does not matter as much
Browse files Browse the repository at this point in the history
  • Loading branch information
Naim2000 committed Jun 23, 2024
1 parent d87fd99 commit 3133ceb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MSET9_installer_script/mset9.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 3133ceb

Please sign in to comment.