I think I got it ... messy / not appearing at the end of folders in the
travis linux where it appears fine on mine :(
This commit is contained in:
@@ -336,8 +336,18 @@ void MTGAllCards::init()
|
|||||||
initCounters();
|
initCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MTGAllCards::loadFolder(const string& folder, const string& filename )
|
void MTGAllCards::loadFolder(const string& infolder, const string& filename )
|
||||||
{
|
{
|
||||||
|
string folder = infolder;
|
||||||
|
|
||||||
|
// Make sure the base paths finish with a '/' or a '\'
|
||||||
|
if (! folder.empty()) {
|
||||||
|
string::iterator c = folder.end();//userPath.at(userPath.size()-1);
|
||||||
|
c--;
|
||||||
|
if ((*c != '/') && (*c != '\\'))
|
||||||
|
folder += '/';
|
||||||
|
}
|
||||||
|
|
||||||
vector<string> files = JFileSystem::GetInstance()->scanfolder(folder);
|
vector<string> files = JFileSystem::GetInstance()->scanfolder(folder);
|
||||||
|
|
||||||
if (!files.size())
|
if (!files.size())
|
||||||
@@ -355,7 +365,7 @@ void MTGAllCards::loadFolder(const string& folder, const string& filename )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(JFileSystem::GetInstance()->DirExists(afile))
|
if(JFileSystem::GetInstance()->DirExists(afile))
|
||||||
loadFolder(string(afile).c_str(), filename);
|
loadFolder(afile, filename);
|
||||||
|
|
||||||
if (!JFileSystem::GetInstance()->FileExists(afile))
|
if (!JFileSystem::GetInstance()->FileExists(afile))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user