summaryrefslogtreecommitdiff
path: root/source/fitz/unzip.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-11-09 14:17:00 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-12-11 12:11:31 +0100
commitc22e6a6dc2bf6acbac955bd5fbdd896329dfd725 (patch)
treed9d84d3a6a74ed74c9d470b532097769545e8dc6 /source/fitz/unzip.c
parent95b928431f233052e4bbbd1b2bf9fc705657b5a7 (diff)
downloadmupdf-c22e6a6dc2bf6acbac955bd5fbdd896329dfd725.tar.xz
Use fz_output instead of FILE* for most of our output needs.
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
Diffstat (limited to 'source/fitz/unzip.c')
-rw-r--r--source/fitz/unzip.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c
index b14705ba..21cfa7a5 100644
--- a/source/fitz/unzip.c
+++ b/source/fitz/unzip.c
@@ -364,14 +364,10 @@ fz_has_archive_entry(fz_context *ctx, fz_archive *zip, const char *name)
if (zip->directory)
{
char path[2048];
- FILE *file;
fz_strlcpy(path, zip->directory, sizeof path);
fz_strlcat(path, "/", sizeof path);
fz_strlcat(path, name, sizeof path);
- file = fz_fopen(path, "rb");
- if (file)
- fclose(file);
- return file != NULL;
+ return fz_file_exists(ctx, path);
}
else
{