From eea38800a98708a18616782e5c3e67ce9c0ca0e3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 5 Mar 2018 13:52:45 +0100 Subject: Don't throw when fz_is_directory is called on a non-existent path. --- source/fitz/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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); } -- cgit v1.2.3