>From 43f623297206fd53285d67f75cf307f5ecee5e68 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh@chollian.net>
Date: Fri, 17 May 2013 11:02:38 +0900
Subject: [PATCH 5/6] vlccore: search HOME env var for user dirs on OS/2

---
 src/os2/dirs.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

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 ();
 }
-- 
1.7.3.2

