From dc42c91619cfe9b750eac5b0b2ec8158f7eabf37 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 24 Jul 2024 07:34:12 +0200 Subject: [PATCH] Fix JSON export of special entries --- src/sink.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sink.zig b/src/sink.zig index b08b105..1312166 100644 --- a/src/sink.zig +++ b/src/sink.zig @@ -168,11 +168,11 @@ const JsonWriter = struct { }; ctx.write(if (isdir) ",\n[{\"name\":\"" else ",\n{\"name\":\""); ctx.writeStr(name); - ctx.writeStr(switch (t) { - .err => "\",\"read_error\":true", - .other_fs => "\",\"excluded\":\"othfs\"", - .kernfs => "\",\"excluded\":\"kernfs\"", - .excluded => "\",\"excluded\":\"pattern\"", + ctx.write(switch (t) { + .err => "\",\"read_error\":true}", + .other_fs => "\",\"excluded\":\"othfs\"}", + .kernfs => "\",\"excluded\":\"kernfs\"}", + .excluded => "\",\"excluded\":\"pattern\"}", }); if (isdir) ctx.writeByte(']'); }