From 7ac91881c85399661a6dde9a843360f1a5d43ee0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 16 Mar 2012 16:40:01 +0100 Subject: Allow XPS document to be opened from unzipped _rels/.rels in mupdf app again. --- apps/pdfapp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 3f0a7350..881c4eb1 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -92,7 +92,9 @@ void pdfapp_open(pdfapp_t *app, char *filename, int fd, int reload) { file = fz_open_fd(ctx, fd); - if (strstr(filename, ".xps") || strstr(filename, ".XPS") || strstr(filename, ".rels")) + if (strstr(filename, ".rels")) + app->doc = (fz_document*) xps_open_document(ctx, filename); + else if (strstr(filename, ".xps") || strstr(filename, ".XPS") || strstr(filename, ".rels")) app->doc = (fz_document*) xps_open_document_with_stream(file); else if (strstr(filename, ".cbz") || strstr(filename, ".CBZ") || strstr(filename, ".zip") || strstr(filename, ".ZIP")) app->doc = (fz_document*) cbz_open_document_with_stream(file); -- cgit v1.2.3