mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-23 08:31:16 -03:00
empty CDPATH elements are equivalent to "."
In the process of fixing the issue I decided it didn't make sense to have two, incompatible, ways of converting variable strings to arrays. Especially since the one I'm removing does not return empty array elements. Fixes #2106
This commit is contained in:
@@ -1919,22 +1919,6 @@ scoped_rwlock::~scoped_rwlock() {
|
||||
}
|
||||
}
|
||||
|
||||
wcstokenizer::wcstokenizer(const wcstring &s, const wcstring &separator)
|
||||
: buffer(), str(), state(), sep(separator) {
|
||||
buffer = wcsdup(s.c_str());
|
||||
str = buffer;
|
||||
state = NULL;
|
||||
}
|
||||
|
||||
bool wcstokenizer::next(wcstring &result) {
|
||||
wchar_t *tmp = wcstok(str, sep.c_str(), &state);
|
||||
str = NULL;
|
||||
if (tmp) result = tmp;
|
||||
return tmp != NULL;
|
||||
}
|
||||
|
||||
wcstokenizer::~wcstokenizer() { free(buffer); }
|
||||
|
||||
template <typename CharType_t>
|
||||
static CharType_t **make_null_terminated_array_helper(
|
||||
const std::vector<std::basic_string<CharType_t> > &argv) {
|
||||
|
||||
Reference in New Issue
Block a user