Remove now-useless code for detecting {}

This can't happen anymore.
This commit is contained in:
Fabian Homborg 2019-05-18 20:40:35 +02:00
parent 967c1d51ee
commit 1e9d41f2c1

View file

@ -531,15 +531,6 @@ static expand_result_t expand_braces(const wcstring &instr, expand_flags_t flags
}
}
// Expand a literal "{}" to itself because it is useless otherwise,
// and this eases e.g. `find -exec {}`. See #1109.
if (brace_begin + 1 == brace_end) {
wcstring newstr = instr;
newstr.at(brace_begin - in) = L'{';
newstr.at(brace_end - in) = L'}';
return expand_braces(newstr, flags, out, errors);
}
if (syntax_error) {
append_syntax_error(errors, SOURCE_LOCATION_UNKNOWN, _(L"Mismatched braces"));
return expand_result_t::error;