Do not try to read init files if the cd to the proper directory fails

darcs-hash:20060511115758-ac50b-94661cb36c5a55bc78ddfe576d1cd40fada5f065.gz
This commit is contained in:
axel 2006-05-11 21:57:58 +10:00
parent af8e053896
commit 94abb30f94

8
main.c
View file

@ -80,9 +80,9 @@ static int read_init()
env_set( L"__fish_help_dir", DOCDIR, 0);
eval( L"builtin cd " DATADIR L"/fish 2>/dev/null; . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd " SYSCONFDIR L" 2>/dev/null; . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd 2>/dev/null;. .fish 2>/dev/null", 0, TOP );
eval( L"builtin cd " DATADIR L"/fish 2>/dev/null; and . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd " SYSCONFDIR L" 2>/dev/null; and . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd 2>/dev/null; and . .fish 2>/dev/null", 0, TOP );
if( chdir( cwd ) == -1 )
{
@ -336,7 +336,7 @@ int main( int argc, char **argv )
}
}
}
proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, getpid(), res );
history_destroy();