/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
add_integer( "timeshift-granularity", 50, NULL, GRANULARITY_TEXT,
GRANULARITY_LONGTEXT, VLC_TRUE );
add_directory( "timeshift-dir", 0, 0, DIR_TEXT, DIR_LONGTEXT, VLC_FALSE );
+ change_unsafe();
add_bool( "timeshift-force", VLC_FALSE, NULL, FORCE_TEXT, FORCE_LONGTEXT,
VLC_FALSE );
vlc_module_end();
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;
#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