Skip to content

Commit

Permalink
Merge pull request #1287 from jacwah/pipe-link
Browse files Browse the repository at this point in the history
Skip symlinks to named pipes
  • Loading branch information
ggreer authored Jan 18, 2019
2 parents fa8cd32 + 095c3f0 commit 7c70fe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ int is_symlink(const char *path, const struct dirent *d) {

int is_named_pipe(const char *path, const struct dirent *d) {
#ifdef HAVE_DIRENT_DTYPE
if (d->d_type != DT_UNKNOWN) {
if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) {
return d->d_type == DT_FIFO || d->d_type == DT_SOCK;
}
#endif
Expand Down

0 comments on commit 7c70fe3

Please sign in to comment.