summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-03-05 13:52:45 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-16 14:51:40 +0100
commiteea38800a98708a18616782e5c3e67ce9c0ca0e3 (patch)
tree4fdcefa8b9cb3c0fe52188b7b022b7b1738dd23b /source/fitz
parent64540ab12be45da103ec27295a6c9c8194f14ee1 (diff)
downloadmupdf-eea38800a98708a18616782e5c3e67ce9c0ca0e3.tar.xz
Don't throw when fz_is_directory is called on a non-existent path.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/directory.c b/source/fitz/directory.c
index df42f83c..bd017a93 100644
--- a/source/fitz/directory.c
+++ b/source/fitz/directory.c
@@ -59,7 +59,7 @@ fz_is_directory(fz_context *ctx, const char *path)
struct stat info;
if (stat(path, &info) < 0)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cannot stat: %s", strerror(errno));
+ return 0;
return S_ISDIR(info.st_mode);
}