Warn about missing HOME for user files only in client mode.

git-svn-id: http://voip.null.ro/svn/yate@2267 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-10-19 16:28:54 +00:00
parent 31fb274ec9
commit 8ca8484416
1 changed files with 5 additions and 2 deletions

View File

@ -258,8 +258,9 @@ static void initUsrPath(String& path, const char* newPath = 0)
path = ::getenv("HOME");
#endif
if (path.null()) {
Debug(DebugWarn,"Could not get per-user application data path!");
return;
if (Engine::clientMode())
Debug(DebugWarn,"Could not get per-user application data path!");
path = s_cfgpath;
}
if (!path.endsWith(PATH_SEP))
path += PATH_SEP;
@ -1496,6 +1497,7 @@ int Engine::main(int argc, const char** argv, const char** env, RunMode mode, bo
continue;
}
if (!::strcmp(pc,"help")) {
s_mode = mode;
initUsrPath(s_usrpath);
usage(client,stdout);
return 0;
@ -1526,6 +1528,7 @@ int Engine::main(int argc, const char** argv, const char** env, RunMode mode, bo
return EINVAL;
break;
case 'h':
s_mode = mode;
initUsrPath(s_usrpath);
usage(client,stdout);
return 0;