mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
Use . as CDPATH if CDPATH is zero length
darcs-hash:20051213201036-ac50b-7567b40f37b409a1bc0ec7b1dc83724057e7e5d2.gz
This commit is contained in:
20
parser.c
20
parser.c
@@ -523,19 +523,23 @@ wchar_t *parser_cdpath_get( wchar_t *dir )
|
||||
}
|
||||
else
|
||||
{
|
||||
wchar_t *path = env_get(L"CDPATH");
|
||||
wchar_t *path;
|
||||
wchar_t *path_cpy;
|
||||
wchar_t *nxt_path;
|
||||
wchar_t *state;
|
||||
wchar_t *whole_path;
|
||||
|
||||
if( path == 0 )
|
||||
path = env_get(L"CDPATH");
|
||||
|
||||
if( !path || !wcslen(path) )
|
||||
{
|
||||
path = L".";
|
||||
}
|
||||
|
||||
wchar_t *path_cpy = wcsdup( path );
|
||||
wchar_t *nxt_path = path;
|
||||
wchar_t *state;
|
||||
wchar_t *whole_path;
|
||||
|
||||
if( (path_cpy==0) )
|
||||
nxt_path = path;
|
||||
path_cpy = wcsdup( path );
|
||||
|
||||
if( !path_cpy )
|
||||
{
|
||||
die_mem();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user