diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/xps/xps-doc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/xps/xps-doc.c b/source/xps/xps-doc.c index fb4511f4..b796b922 100644 --- a/source/xps/xps-doc.c +++ b/source/xps/xps-doc.c @@ -470,15 +470,16 @@ xps_recognize(fz_context *ctx, const char *magic) if (ext) { - if (!fz_strcasecmp(ext, ".xps") || !fz_strcasecmp(ext, ".rels") || !fz_strcasecmp(ext, ".oxps")) + if (!fz_strcasecmp(ext, ".xps") || !fz_strcasecmp(ext, ".oxps")) return 100; } + if (strstr(magic, "/_rels/.rels") || strstr(magic, "\\_rels\\.rels")) + return 100; if (!strcmp(magic, "xps") || !strcmp(magic, "oxps") || !strcmp(magic, "application/vnd.ms-xpsdocument") || !strcmp(magic, "application/xps") || !strcmp(magic, "application/oxps")) return 100; - return 0; } |