]> git.sesse.net Git - vlc/blobdiff - modules/stream_filter/record.c
Add a directory type parameter to config_GetHomeDir
[vlc] / modules / stream_filter / record.c
index 51fd62370e75ad058cd7784eb0317e0ec49e09be..dee348ac01571b55a23064427c3895c645892368 100644 (file)
@@ -175,12 +175,9 @@ static int Start( stream_t *s, const char *psz_extension )
         psz_extension = "dat";
 
     /* Retreive path */
-    char *psz_path = var_CreateGetString( s, "input-record-path" );
-    if( !psz_path || *psz_path == '\0' )
-    {
-        free( psz_path );
-        psz_path = strdup( config_GetHomeDir() );
-    }
+    char *psz_path = var_CreateGetNonEmptyString( s, "input-record-path" );
+    if( !psz_path )
+        psz_path = config_GetUserDir( VLC_HOME_DIR );
 
     if( !psz_path )
         return VLC_ENOMEM;