frontend: silently ignore empty subopts

This commit is contained in:
CismonX 2025-03-25 12:19:11 +08:00
parent bced141b98
commit bd80cbf2c1
No known key found for this signature in database
GPG key ID: 3094873E29A482FB
3 changed files with 5 additions and 2 deletions

View file

@ -431,6 +431,9 @@ parse_opts (
bookmarkfs_opts_add(&info->handler_opts, opt); bookmarkfs_opts_add(&info->handler_opts, opt);
break; break;
case '\0':
break;
default: default:
return SUBOPT_ERR_BAD_KEY(); return SUBOPT_ERR_BAD_KEY();
} }

View file

@ -92,7 +92,7 @@ parse_opts (
char *opt = SUBOPT_STR; char *opt = SUBOPT_STR;
if (opt[0] == '@') { if (opt[0] == '@') {
bookmarkfs_opts_add(&ctx->backend_conf.opts, opt + 1); bookmarkfs_opts_add(&ctx->backend_conf.opts, opt + 1);
} else { } else if (opt[0] != '\0') {
return SUBOPT_ERR_BAD_KEY(); return SUBOPT_ERR_BAD_KEY();
} }
} }

View file

@ -459,7 +459,7 @@ parse_opts (
char *opt = SUBOPT_STR; char *opt = SUBOPT_STR;
if (opt[0] == '@') { if (opt[0] == '@') {
bookmarkfs_opts_add(&info->backend_conf.opts, opt + 1); bookmarkfs_opts_add(&info->backend_conf.opts, opt + 1);
} else { } else if (opt[0] != '\0') {
xassert(0 == fuse_opt_add_opt(&fargs->argv[1], opt)); xassert(0 == fuse_opt_add_opt(&fargs->argv[1], opt));
} }
} }