]> git.sesse.net Git - vlc/blobdiff - modules/access_filter/timeshift.c
freetype: fix a segfault introduced in [21339]
[vlc] / modules / access_filter / timeshift.c
index cd605de7dee411601384080a85c57d1945ceb03b..fd141c816851cb424c467ca94b18a484215c44fb 100644 (file)
@@ -422,8 +422,8 @@ static int WriteBlockToFile( access_t *p_access, block_t *p_block )
         if( !file && p_sys->i_files < 2 )
         {
             /* We just can't work with less than 2 buffer files */
-            msg_Err( p_access, "cannot open temporary file '%s' (%s)",
-                     p_sys->psz_filename, strerror(errno) );
+            msg_Err( p_access, "cannot open temporary file '%s' (%m)",
+                     p_sys->psz_filename );
             return VLC_EGENERIC;
         }
         else if( !file ) return VLC_EGENERIC;
@@ -555,15 +555,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
 #endif
 static char *GetTmpFilePath( access_t *p_access )
 {
-    char *psz_dir = var_GetString( p_access, "timeshift-dir" );
+    char *psz_dir = var_GetNonEmptyString( p_access, "timeshift-dir" );
     char *psz_filename_base;
 
-    if( ( psz_dir != NULL ) && ( psz_dir[0] == '\0' ) )
-    {
-        free( psz_dir );
-        psz_dir = NULL;
-    }
-
     if( psz_dir == NULL )
     {
 #ifdef WIN32