Shell quote the path always.
+ if (bufsize < SIZEOF_STR)
+ buf[bufsize] = 0;
+
} else if (view == VIEW(REQ_VIEW_TREE)) {
const char *format = view->cmd_env ? view->cmd_env : view->cmd_fmt;
} else if (view == VIEW(REQ_VIEW_TREE)) {
const char *format = view->cmd_env ? view->cmd_env : view->cmd_fmt;
if (strcmp(view->vid, view->id))
if (strcmp(view->vid, view->id))
+ opt_path[0] = path[0] = 0;
+ else if (sq_quote(path, 0, opt_path) >= sizeof(path))
+ return FALSE;
- if (!string_format(view->cmd, format, id, opt_path))
+ if (!string_format(view->cmd, format, id, path))