error(sc, "parse error, expected file descriptor");
} else {
dstr d = DSTR_INIT;
- conf_name(sc, '/', &d);
+ conf_fname(sc, &d);
f->type = FTYPE_NAME;
f->u.name = xstrdup(d.buf);
dstr_destroy(&d);
static void file_read(fdata *f, scanner *sc)
{
file_fspec(&f->in, sc);
- if (sc->t != ',') {
+ if (sc->t == ',') {
+ token(sc);
+ file_fspec(&f->out, sc);
+ } else {
f->out = f->in;
if (f->out.type == FTYPE_FD && f->out.u.fd == rstdin)
f->out.u.fd = rstdout;
- } else {
- token(sc);
- file_fspec(&f->out, sc);
+ else if (f->out.type == FTYPE_NAME)
+ f->out.u.name = xstrdup(f->in.u.name);
}
f->fa = fattr_global;
f->fo = file_opts;
ee->ops->close(ee);
goto tidy;
}
- endpt_join(e, ee);
+ endpt_join(e, ee, fs->s.desc);
/* --- Dispose of the source and target now --- */