From 6df7412bbc5b03840855ed451d29f3a5515e68a5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Mar 2014 19:45:00 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/conversion/plugins/djvu_input.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/ebooks/conversion/plugins/djvu_input.py b/src/calibre/ebooks/conversion/plugins/djvu_input.py index 6c93f15dea..70b79c392d 100644 --- a/src/calibre/ebooks/conversion/plugins/djvu_input.py +++ b/src/calibre/ebooks/conversion/plugins/djvu_input.py @@ -36,13 +36,11 @@ class DJVUInput(InputFormatPlugin): setattr(options, opt.option.name, opt.recommended_value) options.input_encoding = 'utf-8' base = os.getcwdu() - if file_ext != 'txtz' and hasattr(stream, 'name'): - base = os.path.dirname(stream.name) fname = os.path.join(base, 'index.html') c = 0 while os.path.exists(fname): c += 1 - fname = 'index%d.html'%c + fname = os.path.join(base, 'index%d.html'%c) htmlfile = open(fname, 'wb') with htmlfile: htmlfile.write(html.encode('utf-8'))