Skip to content

Commit

Permalink
Fix folder name special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
quantrancse committed Jul 5, 2021
1 parent 8059f55 commit 9e02817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hako2epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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:
Expand Down

0 comments on commit 9e02817

Please sign in to comment.