From 2e4504f59986de056f8c60f76d3f9e8d56249b37 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 21 Aug 2016 01:49:52 +0800 Subject: EPUB and XPS may only be zip archives or directories. --- source/html/epub-doc.c | 4 ++-- source/xps/xps-zip.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c index ec506409..f179c5e1 100644 --- a/source/html/epub-doc.c +++ b/source/html/epub-doc.c @@ -443,7 +443,7 @@ epub_init(fz_context *ctx, fz_archive *zip) static fz_document * epub_open_document_with_stream(fz_context *ctx, fz_stream *file) { - return epub_init(ctx, fz_open_archive_with_stream(ctx, file)); + return epub_init(ctx, fz_open_zip_archive_with_stream(ctx, file)); } static fz_document * @@ -460,7 +460,7 @@ epub_open_document(fz_context *ctx, const char *filename) return epub_init(ctx, fz_open_directory(ctx, dirname)); } - return epub_init(ctx, fz_open_archive(ctx, filename)); + return epub_init(ctx, fz_open_zip_archive(ctx, filename)); } static int diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c index 2bf0391f..fbcb6d44 100644 --- a/source/xps/xps-zip.c +++ b/source/xps/xps-zip.c @@ -151,7 +151,7 @@ xps_open_document_with_stream(fz_context *ctx, fz_stream *file) fz_try(ctx) { - doc->zip = fz_open_archive_with_stream(ctx, file); + doc->zip = fz_open_zip_archive_with_stream(ctx, file); xps_read_page_list(ctx, doc); } fz_catch(ctx) -- cgit v1.2.3