Changeset 04aae4db17b7b59c04870677448a0b49262b5f71

Show
Ignore:
Timestamp:
20/05/08 17:50:42 (6 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1211298642 +0300
git-parent:

[cca9e206e38081bcb72ce16e16b8dfdd954a48f7]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1211298642 +0300
Message:

No need to do stat() before opendir()!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/misc/lua/net.c

    r94a6747 r04aae4d  
    284284    DIR *p_dir; 
    285285    int i = 0; 
    286 #ifdef HAVE_SYS_STAT_H 
    287     struct stat s; 
    288     if( utf8_stat( psz_dir, &s ) == -1 ) 
    289         return luaL_error( L, "Error while trying to stat `%s'.", psz_dir ); 
    290     if( !S_ISDIR( s.st_mode ) ) 
    291         return luaL_error( L, "`%s' is not a directory.", psz_dir ); 
    292 #endif 
     286 
    293287    if( ( p_dir = utf8_opendir( psz_dir ) ) == NULL ) 
    294288        return luaL_error( L, "cannot open directory `%s'.", psz_dir );