Commit d59f9b35 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* forwardport: [18328]-[18330]

  * utf8_fopen for: galaktos and snapshots
  * vlc_closedir_wrapper for: webintf, mkv, ncurses and gnutls
parent 8ef23858
...@@ -249,7 +249,7 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root, ...@@ -249,7 +249,7 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
if( !f->name ) if( !f->name )
{ {
msg_Err( p_intf , "unable to parse directory" ); msg_Err( p_intf , "unable to parse directory" );
closedir( p_dir ); vlc_closedir_wrapper( p_dir );
free( f ); free( f );
return( VLC_ENOMEM ); return( VLC_ENOMEM );
} }
...@@ -332,7 +332,7 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root, ...@@ -332,7 +332,7 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
} }
ACL_Destroy( p_acl ); ACL_Destroy( p_acl );
closedir( p_dir ); vlc_closedir_wrapper( p_dir );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -1549,7 +1549,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -1549,7 +1549,7 @@ static int Open( vlc_object_t * p_this )
} }
LocaleFree (psz_file); LocaleFree (psz_file);
} }
closedir( p_src_dir ); vlc_closedir_wrapper( p_src_dir );
} }
} }
......
...@@ -1995,7 +1995,7 @@ static void ReadDir( intf_thread_t *p_intf ) ...@@ -1995,7 +1995,7 @@ static void ReadDir( intf_thread_t *p_intf )
qsort( p_sys->pp_dir_entries, p_sys->i_dir_entries, qsort( p_sys->pp_dir_entries, p_sys->i_dir_entries,
sizeof(struct dir_entry_t*), &comp_dir_entries ); sizeof(struct dir_entry_t*), &comp_dir_entries );
closedir( p_current_dir ); vlc_closedir_wrapper( p_current_dir );
return; return;
} }
else else
......
...@@ -597,7 +597,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this, ...@@ -597,7 +597,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
|| fstat( fd, &st1 ) || utf8_lstat( psz_dirname, &st2 ) || fstat( fd, &st1 ) || utf8_lstat( psz_dirname, &st2 )
|| S_ISLNK( st2.st_mode ) || ( st1.st_ino != st2.st_ino ) ) || S_ISLNK( st2.st_mode ) || ( st1.st_ino != st2.st_ino ) )
{ {
closedir( dir ); vlc_closedir_wrapper( dir );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
} }
...@@ -619,7 +619,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this, ...@@ -619,7 +619,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
gnutls_Addx509File( p_this, cred, path, b_priv ); gnutls_Addx509File( p_this, cred, path, b_priv );
} }
closedir( dir ); vlc_closedir_wrapper( dir );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -520,7 +520,7 @@ int load_preset_file(char * pathname, preset_t * preset) { ...@@ -520,7 +520,7 @@ int load_preset_file(char * pathname, preset_t * preset) {
return FAILURE; return FAILURE;
/* Open the file corresponding to pathname */ /* Open the file corresponding to pathname */
if ((fs = fopen(pathname, "r")) == 0) { if ((fs = utf8_fopen(pathname, "r")) == 0) {
if (PRESET_DEBUG) printf("load_preset_file: loading of file %s failed!\n", pathname); if (PRESET_DEBUG) printf("load_preset_file: loading of file %s failed!\n", pathname);
return ERROR; return ERROR;
} }
...@@ -792,7 +792,7 @@ void savePreset(char * filename) { ...@@ -792,7 +792,7 @@ void savePreset(char * filename) {
return; return;
/* Open the file corresponding to pathname */ /* Open the file corresponding to pathname */
if ((fs = fopen(filename, "w+")) == 0) { if ((fs = utf8_fopen(filename, "w+")) == 0) {
if (PRESET_DEBUG) printf("savePreset: failed to create filename \"%s\"!\n", filename); if (PRESET_DEBUG) printf("savePreset: failed to create filename \"%s\"!\n", filename);
return; return;
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <vlc_vout.h> #include <vlc_vout.h>
#include <vlc_image.h> #include <vlc_image.h>
#include <vlc_osd.h> #include <vlc_osd.h>
#include "charset.h"
#include <vlc_strings.h> #include <vlc_strings.h>
#include <vlc_charset.h> #include <vlc_charset.h>
...@@ -636,7 +637,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -636,7 +637,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" ); char *psz_prefix = var_GetString( p_vout, "snapshot-prefix" );
if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" ); if( !psz_prefix ) psz_prefix = strdup( "vlcsnap-" );
closedir( path ); vlc_closedir_wrapper( path );
if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE ) if( var_GetBool( p_vout, "snapshot-sequential" ) == VLC_TRUE )
{ {
int i_num = var_GetInteger( p_vout, "snapshot-num" ); int i_num = var_GetInteger( p_vout, "snapshot-num" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment