]> git.sesse.net Git - vlc/commitdiff
* configure.ac, modules/access/directory.c: enabled the directory access module on...
authorGildas Bazin <gbazin@videolan.org>
Mon, 21 Feb 2005 13:35:15 +0000 (13:35 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 21 Feb 2005 13:35:15 +0000 (13:35 +0000)
configure.ac
modules/access/directory.c

index 7cf321c7ead33ab1d8eb246e4c88b0effc48f30d..b1c1d090a3f1d5f02bee3b94b93a9fea2232f067 100644 (file)
@@ -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
index 342df80ff4cb90ae3147a8c94d6ac4ca7475ba46..b258abe5a7926054644b861893d64c2d50cff760 100644 (file)
@@ -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") )