- do
- {
-#ifdef UNDER_CE
- unsigned int i_len = wcslen( finddata.cFileName );
- swprintf( psz_wpath, L"%ls\\%ls", psz_wdir, finddata.cFileName );
- sprintf( psz_path, "%s\\%ls", psz_dir, finddata.cFileName );
-#else
- unsigned int i_len = strlen( finddata.cFileName );
- sprintf( psz_path, "%s\\%s", psz_dir, finddata.cFileName );
-#endif
-
- /* Skip ".", ".." */
- if( !*finddata.cFileName || !strcmp( finddata.cFileName, "." )
- || !strcmp( finddata.cFileName, ".." ) )
- {
- if( !FindNextFile( handle, &finddata ) ) break;
- continue;
- }
-
-#ifdef UNDER_CE
- if( GetFileAttributes( psz_wpath ) & FILE_ATTRIBUTE_DIRECTORY )
-#else
- if( GetFileAttributes( psz_path ) & FILE_ATTRIBUTE_DIRECTORY )
-#endif
- {
- AllocatePluginDir( p_this, psz_path, i_maxdepth - 1 );
- }
- else if( i_len > strlen( LIBEXT )
- /* We only load files ending with LIBEXT */
- && !strncasecmp( psz_path + strlen( psz_path)
- - strlen( LIBEXT ),
- LIBEXT, strlen( LIBEXT ) ) )
- {
- WIN32_FILE_ATTRIBUTE_DATA attrbuf;
- int64_t i_time = 0, i_size = 0;
-
-#ifdef UNDER_CE
- if( GetFileAttributesEx( psz_wpath, GetFileExInfoStandard,
- &attrbuf ) )
-#else
- if( GetFileAttributesEx( psz_path, GetFileExInfoStandard,
- &attrbuf ) )
-#endif
- {
- i_time = attrbuf.ftLastWriteTime.dwHighDateTime;
- i_time <<= 32;
- i_time |= attrbuf.ftLastWriteTime.dwLowDateTime;
- i_size = attrbuf.nFileSizeHigh;
- i_size <<= 32;
- i_size |= attrbuf.nFileSizeLow;
- }
- psz_file = psz_path;
-
- AllocatePluginFile( p_this, psz_file, i_time, i_size );
- }
- }
- while( !p_this->p_libvlc->b_die && FindNextFile( handle, &finddata ) );
-
- /* Close the directory */
- FindClose( handle );
-
-#else
- dir = opendir( psz_dir );
- if( !dir )