fix for issue with profiles not loading into options from user folder. the issue was that we we're "removing a trailing "/"" even if there was no trailing slash. added a check for "/" before we chop the last letter of the directory :)

This commit is contained in:
omegablast2002@yahoo.com
2011-09-03 19:20:24 +00:00
parent ac01adc6b8
commit 2183dedb04

View File

@@ -414,7 +414,9 @@ OptionDirectory::OptionDirectory(string root, int id, string displayValue, strin
for (size_t i = 0; i < subfolders.size(); ++i)
{
string subfolder = subfolders[i].substr(0, subfolders[i].length() - 1); //remove trailing "/"
string subfolder = subfolders[i].substr(0, subfolders[i].length());
if(subfolders[i].find("/") == subfolders[i].length())
subfolder = subfolders[i].substr(0, subfolders[i].length() - 1); //remove trailing "/"
vector<string> path;
path.push_back(root);
path.push_back(subfolder);