]> git.sesse.net Git - vlc/commitdiff
Recurse within hidden directories for module search
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 23 Feb 2006 19:37:58 +0000 (19:37 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 23 Feb 2006 19:37:58 +0000 (19:37 +0000)
src/misc/modules.c

index 8dde18d0d51e1467c038b452048b5fad07b7fe60..e59b55c352df25ca1af96ea1039cc8ab38a22975 100644 (file)
@@ -878,8 +878,9 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
         sprintf( psz_path, "%s\\%s", psz_dir, finddata.cFileName );
 #endif
 
-        /* Skip ".", ".." and anything starting with "." */
-        if( !*finddata.cFileName || *finddata.cFileName == '.' )
+        /* Skip ".", ".." */
+        if( !*finddata.cFileName || !strcmp( finddata.cFileName, "." )
+         || !strcmp( finddata.cFileName, ".." ) )
         {
             if( !FindNextFile( handle, &finddata ) ) break;
             continue;
@@ -943,8 +944,9 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir,
         unsigned int i_len;
         int i_stat;
 
-        /* Skip ".", ".." and anything starting with "." */
-        if( !*file->d_name || *file->d_name == '.' )
+        /* Skip ".", ".." */
+        if( !*file->d_name || !strcmp( file->d_name, "." )
+         || !strcmp( file->d_name, ".." ) )
         {
             continue;
         }