cleanup
This commit is contained in:
@@ -239,26 +239,23 @@ void FilenameDB::GetFilesSimpleMatch( const CString &sDir, const CString &sMask,
|
||||
{
|
||||
/* No; just do a regular search. */
|
||||
GetFilesEqualTo( sDir, sMask, asOut, bOnlyDirs );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t second_pos = sMask.find_first_of( '*', first_pos+1 );
|
||||
if( second_pos == sMask.npos )
|
||||
{
|
||||
/* Only one *: "A*B". */
|
||||
/* XXX: "_blank.png*.png" shouldn't match the file "_blank.png". */
|
||||
GetFilesMatching( sDir, sMask.substr(0, first_pos), "", sMask.substr(first_pos+1), asOut, bOnlyDirs );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Two *s: "A*B*C". */
|
||||
GetFilesMatching( sDir,
|
||||
sMask.substr(0, first_pos),
|
||||
sMask.substr(first_pos+1, second_pos-first_pos-1),
|
||||
sMask.substr(second_pos+1), asOut, bOnlyDirs );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the FileSet for dir; if create is true, create the FileSet if necessary.
|
||||
|
||||
Reference in New Issue
Block a user