Commit 518a63be authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac, modules/access/directory.c: enabled the directory access module on WinCE.

parent 1f54a473
......@@ -992,8 +992,7 @@ VLC_ADD_PLUGINS([access_file access_udp access_tcp access_http access_mms])
VLC_ADD_PLUGINS([access_ftp ipv4])
if test "${SYS}" != "mingwce"; then
VLC_ADD_PLUGINS([access_directory sap])
VLC_ADD_PLUGINS([gestures rc telnet hotkeys netsync showintf time marq])
VLC_ADD_PLUGINS([gestures rc telnet hotkeys netsync showintf time marq sap])
fi
dnl
......
......@@ -48,6 +48,8 @@
# include <unistd.h>
#elif defined( WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#elif defined( UNDER_CE )
# define strcoll strcmp
#endif
#ifdef HAVE_DIRENT_H
......@@ -125,6 +127,17 @@ static int Open( vlc_object_t *p_this )
if( ( stat( p_access->psz_path, &stat_info ) == -1 ) ||
!S_ISDIR( stat_info.st_mode ) )
#elif defined(WIN32)
# ifdef UNICODE
wchar_t pwsz_path[MAX_PATH];
mbstowcs( pwsz_path, p_access->psz_path, MAX_PATH );
pwsz_path[MAX_PATH-1] = 0;
if( !(GetFileAttributes( pwsz_path ) & FILE_ATTRIBUTE_DIRECTORY) )
# else
if( !(GetFileAttributes( p_access->psz_path ) & FILE_ATTRIBUTE_DIRECTORY) )
# endif
#else
if( strcmp( p_access->psz_access, "dir") &&
strcmp( p_access->psz_access, "directory") )
......
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