summaryrefslogtreecommitdiff
path: root/src/mod_dirlisting.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_dirlisting.c')
-rw-r--r--src/mod_dirlisting.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_dirlisting.c b/src/mod_dirlisting.c
index bef8923..cd317ec 100644
--- a/src/mod_dirlisting.c
+++ b/src/mod_dirlisting.c
@@ -657,7 +657,8 @@ static int http_list_directory(server *srv, connection *con, plugin_data *p, buf
i = dir->used - 1;
#ifdef HAVE_PATHCONF
- if (-1 == (name_max = pathconf(dir->ptr, _PC_NAME_MAX))) {
+ if (0 >= (name_max = pathconf(dir->ptr, _PC_NAME_MAX))) {
+ /* some broken fs (fuse) return 0 instead of -1 */
#ifdef NAME_MAX
name_max = NAME_MAX;
#else