From 8c6cc354491b91ff666dc80c0ac446742fc462ec Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 1 May 2015 16:45:45 +0200 Subject: [PATCH] fix path --- telemeta/views/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telemeta/views/resource.py b/telemeta/views/resource.py index bee93012..8237204f 100644 --- a/telemeta/views/resource.py +++ b/telemeta/views/resource.py @@ -445,7 +445,7 @@ class CorpusEpubView(TelemetaBaseMixin, View): epub_name = corpus.code + '.epub' path = self.cache_data.dir + os.sep + epub_name epub.write_epub(filename, book, {}) - epub_file = open(filename, 'rb') + epub_file = open(path, 'rb') response = HttpResponse(epub_file.read(), content_type='application/epub+zip') response['Content-Disposition'] = "attachment; filename=%s" % epub_name -- 2.39.5