From: RĂ©mi Denis-Courmont Date: Sat, 23 Jan 2010 17:19:19 +0000 (+0200) Subject: Fix use of --data-path X-Git-Tag: 1.1.0-ff~1012 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=80b17e25cc1287ca582520f6a48e68ca465bf8db;p=vlc Fix use of --data-path --- diff --git a/src/config/dirs.c b/src/config/dirs.c index 695b945550..d05a9f3db2 100644 --- a/src/config/dirs.c +++ b/src/config/dirs.c @@ -37,10 +37,7 @@ */ char *__config_GetDataDir( vlc_object_t *p_obj ) { - char *psz_path = config_GetPsz( p_obj, "data-path" ); - if( psz_path && *psz_path ) - return psz_path; - free( psz_path ); - return config_GetDataDirDefault(); + char *psz_path = var_InheritString( p_obj, "data-path" ); + return psz_path ? psz_path : config_GetDataDirDefault(); }