check for id0 (closes #49)

This commit is contained in:
Ian Burgwin
2021-09-12 08:50:59 -07:00
parent d97e11e4ec
commit 54ae8a504c
2 changed files with 18 additions and 1 deletions

View File

@@ -271,6 +271,10 @@ class CustomInstall:
free_space = get_free_space(self.sd)
return total_size, free_space
def check_for_id0(self):
sd_path = join(self.sd, 'Nintendo 3DS', self.crypto.id0.hex())
return isdir(sd_path)
def start(self):
if frozen:
save3ds_fuse_path = join(script_dir, 'bin', 'save3ds_fuse')
@@ -723,6 +727,10 @@ if __name__ == "__main__":
installer.event.update_percentage += percent_handle
installer.event.on_error += error
if not installer.check_for_id0():
installer.event.on_error(f'Could not find id0 directory {installer.crypto.id0.hex()} '
f'inside Nintendo 3DS directory.')
installer.prepare_titles(args.cia)
if not args.skip_contents: