- Fix a bug with story mode not able to find (unzipped) campaigns

This commit is contained in:
wagic.the.homebrew
2011-08-22 12:33:39 +00:00
parent 164ca240b3
commit 0bc6352d62
3 changed files with 17 additions and 3 deletions

View File

@@ -367,4 +367,16 @@ std::string buildFilePath(const vector<string> & folders, const string & filenam
result.append(filename);
return result;
}
std::string ensureFolder(const std::string & folderName)
{
if (!folderName.size())
return "";
string result = folderName;
if (result[result.length()-1] != '/')
{
result.append("/");
}
return result;
}