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