From 574a4348a3dc5e58247f84ed2f85eae46fd27c92 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 12 Jul 2024 12:36:17 +0200 Subject: [PATCH] Fix --one-file-system to exclude other-fs-symlink targets with --follow-symlinks --- src/scan.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scan.zig b/src/scan.zig index c227c07..2a53c78 100644 --- a/src/scan.zig +++ b/src/scan.zig @@ -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;