Commit e7bcc680 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert broken [17908:17910]

parent 8808f2f0
...@@ -416,13 +416,7 @@ void *vlc_opendir_wrapper( const char *psz_path ) ...@@ -416,13 +416,7 @@ void *vlc_opendir_wrapper( const char *psz_path )
return (void *)p_dir; return (void *)p_dir;
} }
wchar_t wpath[MAX_PATH + 1]; p_real_dir = opendir( psz_path );
if (!MultiByteToWideChar (CP_UTF8, 0, psz_path, -1, wpath, MAX_PATH))
return NULL;
wpath[MAX_PATH] = L'\0';
p_real_dir = _wopendir( wpath );
if ( p_real_dir == NULL ) if ( p_real_dir == NULL )
return NULL; return NULL;
...@@ -451,7 +445,7 @@ struct dirent *vlc_readdir_wrapper( void *_p_dir ) ...@@ -451,7 +445,7 @@ struct dirent *vlc_readdir_wrapper( void *_p_dir )
return &p_dir->dd_dir; return &p_dir->dd_dir;
} }
return _wreaddir( p_dir->p_real_dir ); return readdir( p_dir->p_real_dir );
} }
/* Drive letters mode */ /* Drive letters mode */
...@@ -477,7 +471,7 @@ int vlc_closedir_wrapper( void *_p_dir ) ...@@ -477,7 +471,7 @@ int vlc_closedir_wrapper( void *_p_dir )
if ( p_dir->p_real_dir != NULL ) if ( p_dir->p_real_dir != NULL )
{ {
int i_ret = _wclosedir( p_dir->p_real_dir ); int i_ret = closedir( p_dir->p_real_dir );
free( p_dir ); free( p_dir );
return i_ret; return i_ret;
} }
......
...@@ -429,11 +429,7 @@ int utf8_mkdir( const char *dirname ) ...@@ -429,11 +429,7 @@ int utf8_mkdir( const char *dirname )
void *utf8_opendir( const char *dirname ) void *utf8_opendir( const char *dirname )
{ {
/* TODO: support for WinNT non-ACP filenames */
#if defined (UNDER_CE) || defined (WIN32)
DIR *dir = vlc_opendir_wrapper( dirname );
return dir;
#else
const char *local_name = ToLocale( dirname ); const char *local_name = ToLocale( dirname );
if( local_name != NULL ) if( local_name != NULL )
...@@ -444,8 +440,6 @@ void *utf8_opendir( const char *dirname ) ...@@ -444,8 +440,6 @@ void *utf8_opendir( const char *dirname )
} }
else else
errno = ENOENT; errno = ENOENT;
#endif
return NULL; return NULL;
} }
...@@ -458,11 +452,7 @@ char *utf8_readdir( void *dir ) ...@@ -458,11 +452,7 @@ char *utf8_readdir( void *dir )
if( ent == NULL ) if( ent == NULL )
return NULL; return NULL;
#if defined (UNDER_CE) || defined (WIN32)
return FromWide(ent->d_name);
#else
return vlc_fix_readdir( ent->d_name ); return vlc_fix_readdir( ent->d_name );
#endif
} }
static int dummy_select( const char *str ) static int dummy_select( const char *str )
......
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