When normalizing, OEBPS exist_ok=True.
I hadn't considered that the content.opf would be in the root when there is an OEBPS dir present. There's a whole weird world out there.
This commit is contained in:
parent
29eea3855c
commit
0364b87cf3
1 changed files with 1 additions and 1 deletions
|
@ -834,7 +834,7 @@ class Epub:
|
|||
|
||||
if self.opf_filepath.parent == self.root_directory:
|
||||
oebps = self.root_directory.with_child('OEBPS')
|
||||
os.makedirs(oebps.absolute_path)
|
||||
os.makedirs(oebps.absolute_path, exist_ok=True)
|
||||
self.write_opf()
|
||||
new_opf_path = oebps.with_child(self.opf_filepath.basename)
|
||||
os.rename(self.opf_filepath.absolute_path, new_opf_path.absolute_path)
|
||||
|
|
Loading…
Reference in a new issue