Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Bootil/Platform/Platform_LINUX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ namespace Bootil

BOOTIL_EXPORT int FindFiles( String::List* files, String::List* folders, const BString & strFind, bool bUpUpFolders )
{
BString dirName = strdup( strFind.c_str() );
dirName = dirname( ( char* )dirName.c_str() );
BString findName = strdup( strFind.c_str() );
findName = basename( ( char* )findName.c_str() );
std::vector<char> tmp( strFind.c_str(), strFind.c_str() + strFind.size() + 1 );
BString dirName( dirname( &tmp[0] ) );
tmp = std::vector<char>( strFind.c_str(), strFind.c_str() + strFind.size() + 1 );
BString findName( basename( &tmp[0] ) );

DIR* dp;
dirent* dirp;
int iFiles = 0;
Expand Down
9 changes: 5 additions & 4 deletions src/Bootil/Platform/Platform_OSX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ namespace Bootil

BOOTIL_EXPORT int FindFiles( String::List* files, String::List* folders, const BString & strFind, bool bUpUpFolders )
{
BString dirName = strdup( strFind.c_str() );
dirName = dirname( ( char* )dirName.c_str() );
BString findName = strdup( strFind.c_str() );
findName = basename( ( char* )findName.c_str() );
std::vector<char> tmp( strFind.c_str(), strFind.c_str() + strFind.size() + 1 );
BString dirName( dirname( &tmp[0] ) );
tmp = std::vector<char>( strFind.c_str(), strFind.c_str() + strFind.size() + 1 );
BString findName( basename( &tmp[0] ) );

DIR* dp;
dirent* dirp;
int iFiles = 0;
Expand Down