mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Fix minor bug, PWD was incorrectly set on startup
darcs-hash:20080116220738-75c98-2b7c886629857540efee8f1cab9da0aa9ed8f76d.gz
This commit is contained in:
14
env.c
14
env.c
@@ -480,6 +480,18 @@ static void setup_path()
|
||||
al_destroy( &l );
|
||||
}
|
||||
|
||||
int env_set_pwd()
|
||||
{
|
||||
wchar_t dir_path[4096];
|
||||
wchar_t *res = wgetcwd( dir_path, 4096 );
|
||||
if( !res )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
env_set( L"PWD", dir_path, ENV_EXPORT | ENV_GLOBAL );
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
Set up default values for various variables if not defined.
|
||||
*/
|
||||
@@ -505,6 +517,8 @@ static void env_set_defaults()
|
||||
free( unam_narrow );
|
||||
}
|
||||
|
||||
env_set_pwd();
|
||||
|
||||
}
|
||||
|
||||
void env_init()
|
||||
|
||||
Reference in New Issue
Block a user