Skip to content

Commit b058789

Browse files
committed
Bundle: Tokenizer received c-string as arguiment, not char. Fixes error in findung bundle path
1 parent 63a9b0a commit b058789

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Bundle.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Bundle * Bundle::instance;
1717

1818
//Splits a string into a vector at the position of a specific tokens that are
1919
//present in the input string.
20-
std::vector<std::string> tokenize(std::string data, char delim)
20+
std::vector<std::string> tokenize(std::string data, std::string delim)
2121
{
22-
boost::char_separator<char> sep(&delim);
22+
boost::char_separator<char> sep(delim.c_str());
2323
boost::tokenizer<boost::char_separator<char> > tokens(data, sep);
2424

2525
std::vector<std::string> ret;
@@ -89,7 +89,7 @@ SingleBundle SingleBundle::fromFullPath(std::string bundlePath)
8989
{
9090
SingleBundle bundle;
9191
bundle.path = bundlePath;
92-
std::vector<std::string> tkn = tokenize(bundlePath, '/');
92+
std::vector<std::string> tkn = tokenize(bundlePath, "/");
9393
bundle.name = tkn.back();
9494
bundle.setAndValidatePaths();
9595
return bundle;
@@ -225,7 +225,7 @@ bool Bundle::initialize()
225225
if(pathsC)
226226
{
227227
std::string paths = pathsC;
228-
bundleSearchPaths = tokenize(paths, ':');
228+
bundleSearchPaths = tokenize(paths, ":");
229229
}else
230230
{
231231
std::clog << "No bundle search path set. Consider setting environment "\

0 commit comments

Comments
 (0)