uses B_COMMON_SETTINGS_DIRECTORY/network/hosts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34027 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -68,6 +68,10 @@
|
|||||||
# include "pcomplete.h"
|
# include "pcomplete.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
#include <FindDirectory.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* These should agree with the defines for emacs_mode and vi_mode in
|
/* These should agree with the defines for emacs_mode and vi_mode in
|
||||||
rldefs.h, even though that's not a public readline header file. */
|
rldefs.h, even though that's not a public readline header file. */
|
||||||
#ifndef EMACS_EDITING_MODE
|
#ifndef EMACS_EDITING_MODE
|
||||||
@@ -634,10 +638,16 @@ static void
|
|||||||
initialize_hostname_list ()
|
initialize_hostname_list ()
|
||||||
{
|
{
|
||||||
char *temp;
|
char *temp;
|
||||||
|
char path[PATH_MAX];
|
||||||
|
|
||||||
temp = get_string_value ("HOSTFILE");
|
temp = get_string_value ("HOSTFILE");
|
||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
temp = get_string_value ("hostname_completion_file");
|
temp = get_string_value ("hostname_completion_file");
|
||||||
|
if (temp == 0 && find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
|
sizeof(path)) == B_OK) {
|
||||||
|
strlcat(path, "/network/hosts", sizeof(path));
|
||||||
|
temp = path;
|
||||||
|
}
|
||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
temp = DEFAULT_HOSTS_FILE;
|
temp = DEFAULT_HOSTS_FILE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user