[vlc-devel] [PATCH 2/3] vlccore: modify OS/2 directories configuration

KO Myung-Hun komh78 at gmail.com
Fri May 17 10:38:03 CEST 2013


Updated. ^^

KO Myung-Hun wrote:
> 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 ();
>  }

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.24 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-vlccore-search-HOME-env-var-for-user-dirs-on-OS-2.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130517/6f9c8a32/attachment.ksh>


More information about the vlc-devel mailing list