diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-01-05 23:28:12 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-01-05 23:28:12 +0100 |
commit | 62c02278b7c9eee6668d9a0875e44f3e2c8cf464 (patch) | |
tree | 3583239711f95dd9c9be420ab8ebb40fa83d3803 /xps | |
parent | 2ae2a7b68381f0fc5940e983ccdec5b4cc08d188 (diff) | |
download | mupdf-62c02278b7c9eee6668d9a0875e44f3e2c8cf464.tar.xz |
Remove stray semicolons and fix typo in xps zip code.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_zip.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c index 42d6b3c4..7bc90319 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -314,13 +314,15 @@ static int xps_has_zip_part(xps_document *doc, char *name) { char buf[2048]; + if (name[0] == '/') + name++; if (xps_find_zip_entry(doc, name)) return 1; sprintf(buf, "%s/[0].piece", name); - if (xps_find_zip_entry(doc, buf)); + if (xps_find_zip_entry(doc, buf)) return 1; sprintf(buf, "%s/[0].last.piece", name); - if (xps_find_zip_entry(doc, buf)); + if (xps_find_zip_entry(doc, buf)) return 1; return 0; } @@ -420,10 +422,10 @@ xps_has_dir_part(xps_document *doc, char *name) if (file_exists(doc, name)) return 1; sprintf(buf, "%s/[0].piece", name); - if (file_exists(doc, buf)); + if (file_exists(doc, buf)) return 1; sprintf(buf, "%s/[0].last.piece", name); - if (file_exists(doc, buf)); + if (file_exists(doc, buf)) return 1; return 0; } |