From 6adc35c63622888ddfa876c488ca41910f8efe13 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Fri, 8 Apr 2016 15:52:10 -0700 Subject: [PATCH] add missing special-case for ../ When I reviewed the fix for #952 I noted that "../" wasn't handled but in my haste to merge it forgot to augment the pull-request. --- src/expand.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/expand.cpp b/src/expand.cpp index cb68eb980..72a72e77f 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -1818,8 +1818,9 @@ static expand_error_t expand_stage_wildcards(const wcstring &input, std::vector< In either case, we ignore the path if we start with ./ or /. Also ignore it if we are doing command completion and we contain a slash, per IEEE 1003.1, chapter 8 under PATH */ - if (string_prefixes_string(L"./", path_to_expand) || - string_prefixes_string(L"/", path_to_expand) || + if (string_prefixes_string(L"/", path_to_expand) || + string_prefixes_string(L"./", path_to_expand) || + string_prefixes_string(L"../", path_to_expand) || (for_command && path_to_expand.find(L'/') != wcstring::npos)) { effective_working_dirs.push_back(working_dir);