Commit 39e246e7 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Rafaël Carré

vlccore: search HOME env var for user dirs on OS/2

Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent d9319dc8
...@@ -64,6 +64,15 @@ char *config_GetDataDir (void) ...@@ -64,6 +64,15 @@ char *config_GetDataDir (void)
return datadir; return datadir;
} }
static char *config_GetHomeDir (void)
{
const char *home = getenv ("HOME");
if (home != NULL)
return FromLocaleDup (home);
return config_GetLibDir();
}
char *config_GetUserDir (vlc_userdir_t type) char *config_GetUserDir (vlc_userdir_t type)
{ {
switch (type) switch (type)
...@@ -82,5 +91,5 @@ char *config_GetUserDir (vlc_userdir_t type) ...@@ -82,5 +91,5 @@ char *config_GetUserDir (vlc_userdir_t type)
case VLC_VIDEOS_DIR: case VLC_VIDEOS_DIR:
break; break;
} }
return config_GetLibDir (); return config_GetHomeDir ();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment