From b3274919d2bbb016708b81414805251c4023adfd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 22 Mar 2025 14:44:55 +0530 Subject: [PATCH] Fix #2103846 [Can not read fb2 books through content server interface](https://bugs.launchpad.net/calibre/+bug/2103846) --- src/calibre/ebooks/conversion/plugins/fb2_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/plugins/fb2_input.py b/src/calibre/ebooks/conversion/plugins/fb2_input.py index 9a00be2f5e..aeb6a393b6 100644 --- a/src/calibre/ebooks/conversion/plugins/fb2_input.py +++ b/src/calibre/ebooks/conversion/plugins/fb2_input.py @@ -134,7 +134,7 @@ class FB2Input(InputFormatPlugin): with open('index.xhtml', 'wb') as f: f.write(index.encode('utf-8')) with open('inline-styles.css', 'wb') as f: - f.write(css.encode('utf-8')) + f.write(css.encode('utf-8') or b' ') # srv/render_book.py filters out empty files but index.xhtml links to this file stream.seek(0) mi = get_metadata(stream, 'fb2') if not mi.title: