From 3d2af5b8dbda182a2be8df30ea8149239f617d8d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 26 Dec 2017 21:45:11 +0200 Subject: Small fix in extension/gawkfts.c. --- extension/gawkfts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extension/gawkfts.c') diff --git a/extension/gawkfts.c b/extension/gawkfts.c index d9edd87f..c7fbc17d 100644 --- a/extension/gawkfts.c +++ b/extension/gawkfts.c @@ -1239,7 +1239,7 @@ fts_safe_changedir(const FTS *sp, const FTSENT *p, int fd, const char *path) if (ISSET(FTS_NOCHDIR)) return 0; - if (oldfd < 0 && (fd = open(path, O_RDONLY)) == -1) + if (oldfd < 0 && (path == NULL || (fd = open(path, O_RDONLY)) == -1)) return -1; if (fstat(fd, &sb) == -1) -- cgit v1.2.3