From 88c9b8718eebaee02118d63a0ea21d62235964a4 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 24 Jul 2024 10:40:43 +0200 Subject: [PATCH] Fix JSON export of "otherfs" excluded type Corresponds to 08d373881cb9ccb87464c58e3300160d899af0c1 on the zig branch. --- src/dir_export.c | 3 +-- src/dir_import.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dir_export.c b/src/dir_export.c index 6d68acd..ec05639 100644 --- a/src/dir_export.c +++ b/src/dir_export.c @@ -108,7 +108,6 @@ static void output_info(struct dir *d, const char *name, struct dir_ext *e, unsi output_int(e->mtime); } - /* TODO: Including the actual number of links would be nicer. */ if(d->flags & FF_HLNKC) { fputs(",\"ino\":", stream); output_int(d->ino); @@ -123,7 +122,7 @@ static void output_info(struct dir *d, const char *name, struct dir_ext *e, unsi if(d->flags & FF_EXL) fputs(",\"excluded\":\"pattern\"", stream); else if(d->flags & FF_OTHFS) - fputs(",\"excluded\":\"othfs\"", stream); + fputs(",\"excluded\":\"otherfs\"", stream); else if(d->flags & FF_KERNFS) fputs(",\"excluded\":\"kernfs\"", stream); else if(d->flags & FF_FRMLNK) diff --git a/src/dir_import.c b/src/dir_import.c index a6db2ec..1425fed 100644 --- a/src/dir_import.c +++ b/src/dir_import.c @@ -490,7 +490,7 @@ static int iteminfo(void) { C(rlit("false", 5)); } else if(strcmp(ctx->val, "excluded") == 0) { /* excluded */ C(rstring(ctx->val, 8)); - if(strcmp(ctx->val, "otherfs") == 0) + if(strcmp(ctx->val, "otherfs") == 0 || strcmp(ctx->val, "othfs") == 0) ctx->buf_dir->flags |= FF_OTHFS; else if(strcmp(ctx->val, "kernfs") == 0) ctx->buf_dir->flags |= FF_KERNFS;