mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
Fix JSON export of special entries
This commit is contained in:
parent
2b2b4473e5
commit
dc42c91619
1 changed files with 5 additions and 5 deletions
10
src/sink.zig
10
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(']');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue