mirror of
https://github.com/xprism1/ntool.git
synced 2025-06-18 16:35:34 -04:00
utils: cdn2cia: fix moving to output file
This commit is contained in:
parent
c6a1abc562
commit
bca15f126a
8
utils.py
8
utils.py
@ -555,17 +555,15 @@ def cdn2cia(path, out='', title_ver='', cdn_dev=0, cia_dev=0):
|
||||
cdn.decrypt()
|
||||
cf = [i for i in os.listdir('.') if i.endswith('.ncch') or i.endswith('.nds')]
|
||||
|
||||
CIABuilder(content_files=cf, tik=tik, tmd=tmd, meta=1, dev=cia_dev, out=out)
|
||||
CIABuilder(content_files=cf, tik=tik, tmd=tmd, meta=1, dev=cia_dev, out='tmp.cia')
|
||||
for i in cf:
|
||||
os.remove(i)
|
||||
if os.path.isfile('tik'):
|
||||
os.remove('tik')
|
||||
|
||||
if not os.path.isfile(f'../{out}'):
|
||||
shutil.move(out, f'../{out}')
|
||||
else:
|
||||
shutil.move(out, f'../{name}.{t.hdr.title_ver} (new).cia')
|
||||
shutil.move('tmp.cia', '../tmp.cia')
|
||||
os.chdir('..')
|
||||
shutil.move('tmp.cia', out)
|
||||
|
||||
def csu2retailcias(path, out=''):
|
||||
if out == '':
|
||||
|
Loading…
Reference in New Issue
Block a user