From 9e028176276e08cf4c6e8ed0f85886da33408921 Mon Sep 17 00:00:00 2001 From: quantrancse Date: Mon, 5 Jul 2021 23:39:13 +0700 Subject: [PATCH] Fix folder name special characters --- hako2epub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hako2epub.py b/hako2epub.py index b11df29..aecfabc 100644 --- a/hako2epub.py +++ b/hako2epub.py @@ -358,7 +358,7 @@ def bind_epub_book(self): epub_name = epub_name.replace(' ', '-') self.set_metadata(epub_name, self.ln.author) - epub_folder = self.ln.name.replace(' ', '-') + epub_folder = self.ln.name.replace(' ', '-').replace('?', '').replace('!', '') if not isdir(epub_folder): mkdir(epub_folder) @@ -381,7 +381,7 @@ def create_epub(self, ln): def update_epub(self, ln, volume): epub_name = volume.name + '-' + ln.name + '.epub' epub_name = epub_name.replace(' ', '-') - epub_folder = ln.name.replace(' ', '-') + epub_folder = ln.name.replace(' ', '-').replace('?', '').replace('!', '') epub_path = epub_folder + '/' + epub_name try: