Skip to content

Commit cfc13df

Browse files
Merge pull request #239 from jspiers/main
Minor fix to ingest-processor to create the tmp_conversion_dir if it does not already exist
2 parents 4bc777f + 061fde4 commit cfc13df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/ingest_processor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def __init__(self, filepath: str):
5151
self.hierarchy_of_success = {'epub', 'lit', 'mobi', 'azw', 'epub', 'azw3', 'fb2', 'fbz', 'azw4', 'prc', 'odt', 'lrf', 'pdb', 'cbz', 'pml', 'rb', 'cbr', 'cb7', 'cbc', 'chm', 'djvu', 'snb', 'tcr', 'pdf', 'docx', 'rtf', 'html', 'htmlz', 'txtz', 'txt'}
5252
self.ingest_folder, self.library_dir, self.tmp_conversion_dir = self.get_dirs("/app/calibre-web-automated/dirs.json")
5353

54+
# Create the tmp_conversion_dir if it does not already exist
55+
Path(self.tmp_conversion_dir).mkdir(exist_ok=True)
56+
5457
self.filepath = filepath # path of the book we're targeting
5558
self.filename = os.path.basename(filepath)
5659
self.is_target_format = bool(self.filepath.endswith(self.target_format))

0 commit comments

Comments
 (0)