aboutsummaryrefslogtreecommitdiffstats
path: root/extension/gawkfts.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-12-28 20:51:34 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-12-28 20:51:34 +0200
commit18906a48d06521c9bbd77ffe6c3dbf9498ca5b20 (patch)
treeaffbe2c45bc4d3f88d53fa14f7f5fde02f3ad463 /extension/gawkfts.c
parent348c16bbdf8c1599188d7f60e9e9ff58fa9e7484 (diff)
parent57801f2be5b7548e2dba148a54c0b0542a4240c7 (diff)
downloadegawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.tar.gz
egawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.tar.bz2
egawk-18906a48d06521c9bbd77ffe6c3dbf9498ca5b20.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'extension/gawkfts.c')
-rw-r--r--extension/gawkfts.c2
1 files changed, 1 insertions, 1 deletions
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)