[vlc-commits] vlccore: search HOME env var for user dirs on OS/2
KO Myung-Hun
git at videolan.org
Fri May 17 13:25:12 CEST 2013
vlc | branch: master | KO Myung-Hun <komh at chollian.net> | Fri May 17 11:02:38 2013 +0900| [39e246e788fbc756396dfa6583a8e87d5c5159c2] | committer: Rafaël Carré
vlccore: search HOME env var for user dirs on OS/2
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39e246e788fbc756396dfa6583a8e87d5c5159c2
---
src/os2/dirs.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/os2/dirs.c b/src/os2/dirs.c
index 39a9262..09bc26f 100644
--- a/src/os2/dirs.c
+++ b/src/os2/dirs.c
@@ -64,6 +64,15 @@ char *config_GetDataDir (void)
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)
{
switch (type)
@@ -82,5 +91,5 @@ char *config_GetUserDir (vlc_userdir_t type)
case VLC_VIDEOS_DIR:
break;
}
- return config_GetLibDir ();
+ return config_GetHomeDir ();
}
More information about the vlc-commits
mailing list