mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-14 17:58:40 -09:00
Fix --one-file-system to exclude other-fs-symlink targets with --follow-symlinks
This commit is contained in:
parent
0215f3569d
commit
574a4348a3
1 changed files with 4 additions and 4 deletions
|
|
@ -479,10 +479,6 @@ fn scanDir(ctx: *Context, pat: *const exclude.Patterns, dir: std.fs.Dir, dir_dev
|
||||||
ctx.addSpecial(.err);
|
ctx.addSpecial(.err);
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if (main.config.same_fs and ctx.stat.dev != dir_dev) {
|
|
||||||
ctx.addSpecial(.other_fs);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (main.config.follow_symlinks and ctx.stat.symlink) {
|
if (main.config.follow_symlinks and ctx.stat.symlink) {
|
||||||
if (Stat.read(dir, ctx.name, true)) |nstat| {
|
if (Stat.read(dir, ctx.name, true)) |nstat| {
|
||||||
|
|
@ -495,6 +491,10 @@ fn scanDir(ctx: *Context, pat: *const exclude.Patterns, dir: std.fs.Dir, dir_dev
|
||||||
}
|
}
|
||||||
} else |_| {}
|
} else |_| {}
|
||||||
}
|
}
|
||||||
|
if (main.config.same_fs and ctx.stat.dev != dir_dev) {
|
||||||
|
ctx.addSpecial(.other_fs);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (excluded) |e| if (e and ctx.stat.dir) {
|
if (excluded) |e| if (e and ctx.stat.dir) {
|
||||||
ctx.addSpecial(.excluded);
|
ctx.addSpecial(.excluded);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue