Added a step to RageFileManager::GetDirlisting to ignore OS X special files.
This commit is contained in:
@@ -432,6 +432,22 @@ void RageFileManager::GetDirListing( const RString &sPath_, vector<RString> &Add
|
||||
|
||||
UnreferenceAllDrivers( apDriverList );
|
||||
|
||||
// Remove files that start with ._ from the list because these are special
|
||||
// OS X files that cause interference on other platforms. -Kyz
|
||||
for(size_t i= iOldSize; i < AddTo.size(); ++i)
|
||||
{
|
||||
size_t last_slash= AddTo[i].rfind('/');
|
||||
last_slash= (last_slash == string::npos) ? 0 : (last_slash+1);
|
||||
if(last_slash < AddTo[i].size() - 1)
|
||||
{
|
||||
if(AddTo[i][last_slash] == '.' && AddTo[i][last_slash+1] == '_')
|
||||
{
|
||||
AddTo.erase(AddTo.begin() + i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( iDriversThatReturnedFiles > 1 )
|
||||
{
|
||||
/* More than one driver returned files. Remove duplicates (case-insensitively). */
|
||||
|
||||
Reference in New Issue
Block a user