diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-01 23:52:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-01 23:52:10 -0800 |
commit | 31c0ddaa876f22274193f6656498d247e42236e6 (patch) | |
tree | d12d9f905e4ca2cc865c61d884c473b9e455d0a6 /match.c | |
parent | eb7ec6f6bb7ba84fa294bc6ab6dd1c03c65264e4 (diff) | |
download | txr-31c0ddaa876f22274193f6656498d247e42236e6.tar.gz txr-31c0ddaa876f22274193f6656498d247e42236e6.tar.bz2 txr-31c0ddaa876f22274193f6656498d247e42236e6.zip |
Bugfix: premature open of data source.
match.c (open_data_source): complex_open was being
called before the check against opening the data source
because the query starting with a non-matching directive.
This is moved down into a more nested scope.
This bug was found thanks to complex_open now throwing
exceptions.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3826,7 +3826,6 @@ static void open_data_source(match_files_ctx *c) val nothrow = tnil(ss_consp && car(source_spec) == nothrow_k); if (stringp(name)) { - val stream = complex_open(name, nil, nil); spec_bind (specline, first_spec, c->spec); if (consp(first_spec) && (gethash(non_matching_directive_table, @@ -3836,6 +3835,7 @@ static void open_data_source(match_files_ctx *c) "since query starts with non-matching " "directive."), name, nao); } else { + val stream = complex_open(name, nil, nil, nothrow); val spec = first(c->spec); debuglf(spec, lit("opening data source ~a"), name, nao); |