Correct the warning for invalid directories

This was inadvertently broken.
This commit is contained in:
ridiculousfish 2019-05-01 17:47:50 -07:00
parent 55e3270ac4
commit 72e43a514b

View file

@ -258,8 +258,9 @@ static void maybe_issue_path_warning(const wcstring &which_dir, const wcstring &
int saved_errno) {
auto &vars = env_stack_t::globals();
wcstring warning_var_name = L"_FISH_WARNED_" + which_dir;
auto var = vars.get(warning_var_name, ENV_GLOBAL | ENV_EXPORT);
if (!var) return;
if (vars.get(warning_var_name, ENV_GLOBAL | ENV_EXPORT)) {
return;
}
vars.set_one(warning_var_name, ENV_GLOBAL | ENV_EXPORT, L"1");
debug(0, custom_error_msg.c_str());