]> git.sesse.net Git - vlc/commitdiff
Don't test if a directory exists twice in a row
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 20 May 2008 15:52:22 +0000 (18:52 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 20 May 2008 15:52:22 +0000 (18:52 +0300)
Better yet try to parse it directly...

modules/control/http/http.c

index 17377229f40be4fe9ae91d7d5362e7fc5239ec43..92d08392aea02f54622ea749a924a4d68c305216 100644 (file)
@@ -100,9 +100,6 @@ int  ArtCallback( httpd_handler_sys_t *p_args,
 #if !defined(__APPLE__) && !defined(SYS_BEOS) && !defined(WIN32)
 static int DirectoryCheck( const char *psz_dir )
 {
-    DIR           *p_dir;
-
-#ifdef HAVE_SYS_STAT_H
     struct stat   stat_info;
 
     if( ( utf8_stat( psz_dir, &stat_info ) == -1 )
@@ -110,14 +107,6 @@ static int DirectoryCheck( const char *psz_dir )
     {
         return VLC_EGENERIC;
     }
-#endif
-
-    if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL )
-    {
-        return VLC_EGENERIC;
-    }
-    closedir( p_dir );
-
     return VLC_SUCCESS;
 }
 #endif