From 08564ec7b62f5ba365c9c413627d02402a0dcf6d Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 15 May 2020 08:43:43 +0200 Subject: [PATCH] dir_scan.c: Call statfs() with relative path So we get around the PATH_MAX limitation. Also a tiny bit more efficient, I hope. --- src/dir_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dir_scan.c b/src/dir_scan.c index ea3c267..1696025 100644 --- a/src/dir_scan.c +++ b/src/dir_scan.c @@ -237,7 +237,7 @@ static int dir_scan_item(const char *name) { #if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS if(exclude_kernfs && !(buf_dir->flags & (FF_ERR|FF_EXL)) && S_ISDIR(st.st_mode)) { struct statfs fst; - if(statfs(dir_curpath, &fst)) { + if(statfs(name, &fst)) { buf_dir->flags |= FF_ERR; dir_setlasterr(dir_curpath); } else if(is_kernfs(fst.f_type))