Replace copyfile + remove with move (#1373)

* remove mobiPath toclean

* remove copyfile _comic.zip
This commit is contained in:
Alex Xu
2026-06-24 18:58:27 -07:00
committed by GitHub
parent 0f009755b1
commit f1b58c83d6
3 changed files with 4 additions and 16 deletions
+1 -2
View File
@@ -136,12 +136,11 @@ def del_exth(rec0, exth_num):
class DualMobiMetaFix:
def __init__(self, infile, outfile, asin, is_pdoc):
def __init__(self, outfile, asin, is_pdoc):
cdetype = b'EBOK'
if is_pdoc:
cdetype = b'PDOC'
shutil.copyfile(infile, outfile)
f = open(outfile, "r+b")
self.datain = mmap.mmap(f.fileno(), 0)
self.datain_rec0 = readsection(self.datain, 0)