diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-02-09 08:45:15 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-02-09 08:45:15 +0100 |
commit | 0ea74e5c7f0b06830405534f79b6c5f32185d9c1 (patch) | |
tree | ec0c25df14777984e416b66051569eb351f10a81 /source/dialogs | |
parent | 87251a991cdf8cc04b7e1d0068c3ae39ec7e8966 (diff) |
Update function check configure.ac
Diffstat (limited to 'source/dialogs')
-rw-r--r-- | source/dialogs/ssh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c index c0ba2f8c..31a19f7e 100644 --- a/source/dialogs/ssh.c +++ b/source/dialogs/ssh.c @@ -138,7 +138,7 @@ static void delete_ssh ( const char *host ) */ static char **read_known_hosts_file ( char ** retv, unsigned int *length ) { - char *path = g_build_filename ( g_getenv ( "HOME" ), ".ssh", "known_hosts", NULL ); + char *path = g_build_filename ( g_get_home_dir (), ".ssh", "known_hosts", NULL ); FILE *fd = fopen ( path, "r" ); if ( fd != NULL ) { char *buffer = NULL; @@ -267,7 +267,7 @@ static char ** get_ssh ( unsigned int *length ) unsigned int num_favorites = 0; char *path; - if ( getenv ( "HOME" ) == NULL ) { + if ( g_get_home_dir () == NULL ) { return NULL; } @@ -284,7 +284,7 @@ static char ** get_ssh ( unsigned int *length ) } FILE *fd = NULL; - const char *hd = getenv ( "HOME" ); + const char *hd = g_get_home_dir (); path = g_build_filename ( hd, ".ssh", "config", NULL ); fd = fopen ( path, "r" ); |