[vlc-devel] [PATCH 2/3] vlccore: modify OS/2 directories configuration
KO Myung-Hun
komh78 at gmail.com
Fri May 17 09:29:44 CEST 2013
1. Make a home dir as a default dir if possible
2. Distinguish a data dir
---
src/os2/dirs.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/os2/dirs.c b/src/os2/dirs.c
index 39a9262..c6aaafb 100644
--- a/src/os2/dirs.c
+++ b/src/os2/dirs.c
@@ -64,13 +64,26 @@ 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)
{
case VLC_HOME_DIR:
case VLC_CONFIG_DIR:
+ break;
+
case VLC_DATA_DIR:
+ return config_GetDataDir();
+
case VLC_CACHE_DIR:
case VLC_DESKTOP_DIR:
case VLC_DOWNLOAD_DIR:
@@ -82,5 +95,5 @@ char *config_GetUserDir (vlc_userdir_t type)
case VLC_VIDEOS_DIR:
break;
}
- return config_GetLibDir ();
+ return config_GetHomeDir ();
}
--
1.7.3.2
More information about the vlc-devel
mailing list