mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
dir_scan.c: Call statfs() with relative path
So we get around the PATH_MAX limitation. Also a tiny bit more efficient, I hope.
This commit is contained in:
parent
c9ce16a633
commit
08564ec7b6
1 changed files with 1 additions and 1 deletions
|
|
@ -237,7 +237,7 @@ static int dir_scan_item(const char *name) {
|
||||||
#if HAVE_LINUX_MAGIC_H && HAVE_SYS_STATFS_H && HAVE_STATFS
|
#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)) {
|
if(exclude_kernfs && !(buf_dir->flags & (FF_ERR|FF_EXL)) && S_ISDIR(st.st_mode)) {
|
||||||
struct statfs fst;
|
struct statfs fst;
|
||||||
if(statfs(dir_curpath, &fst)) {
|
if(statfs(name, &fst)) {
|
||||||
buf_dir->flags |= FF_ERR;
|
buf_dir->flags |= FF_ERR;
|
||||||
dir_setlasterr(dir_curpath);
|
dir_setlasterr(dir_curpath);
|
||||||
} else if(is_kernfs(fst.f_type))
|
} else if(is_kernfs(fst.f_type))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue