mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -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);
|
||||
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 (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 |_| {}
|
||||
}
|
||||
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) {
|
||||
ctx.addSpecial(.excluded);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue