From b5852253085af548c60633d3e573db6814655811 Mon Sep 17 00:00:00 2001 From: ricterz Date: Sat, 11 Jan 2025 07:52:51 +0800 Subject: [PATCH] fix #370 --- nhentai/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nhentai/utils.py b/nhentai/utils.py index 8253e4e..1f899ec 100644 --- a/nhentai/utils.py +++ b/nhentai/utils.py @@ -101,8 +101,8 @@ def parse_doujinshi_obj( ) -> Tuple[str, str]: filename = f'./doujinshi.{file_type}' - doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename) if doujinshi_obj is not None: + doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename) _filename = f'{doujinshi_obj.filename}.{file_type}' if file_type == 'cbz': @@ -112,6 +112,8 @@ def parse_doujinshi_obj( _filename = _filename.replace('/', '-') filename = os.path.join(output_dir, _filename) + else: + doujinshi_dir = './' return doujinshi_dir, filename