mirror of
https://github.com/xprism1/ntool.git
synced 2025-06-19 02:55:39 -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()
|
cdn.decrypt()
|
||||||
cf = [i for i in os.listdir('.') if i.endswith('.ncch') or i.endswith('.nds')]
|
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:
|
for i in cf:
|
||||||
os.remove(i)
|
os.remove(i)
|
||||||
if os.path.isfile('tik'):
|
if os.path.isfile('tik'):
|
||||||
os.remove('tik')
|
os.remove('tik')
|
||||||
|
|
||||||
if not os.path.isfile(f'../{out}'):
|
shutil.move('tmp.cia', '../tmp.cia')
|
||||||
shutil.move(out, f'../{out}')
|
|
||||||
else:
|
|
||||||
shutil.move(out, f'../{name}.{t.hdr.title_ver} (new).cia')
|
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
|
shutil.move('tmp.cia', out)
|
||||||
|
|
||||||
def csu2retailcias(path, out=''):
|
def csu2retailcias(path, out=''):
|
||||||
if out == '':
|
if out == '':
|
||||||
|
Loading…
Reference in New Issue
Block a user