Change-Id: Ia528f3c2daab56c7b03ca4f679028545bf62ce21
bool isNativeImage(const std::string& fileName);
std::string readSelfPath();
std::string concatPath(const std::string& path1, const std::string& path2);
+void splitPath(const std::string& path, std::vector<std::string>& out);
void appendPath(std::string& path1, const std::string& path2);
std::string absolutePath(const std::string& path);
std::string baseName(const std::string& path);
if (pluginGetDllPath) {
std::string pluginPath = pluginGetDllPath();
if (!pluginPath.empty()) {
- searchDirectories.push_back(pluginPath);
+ splitPath(pluginPath, searchDirectories);
}
}
return path;
}
+void splitPath(const std::string& path, std::vector<std::string>& out)
+{
+ std::istringstream ss(path);
+ std::string token;
+
+ while (std::getline(ss, token, ':')) {
+ out.push_back(token);
+ }
+}
+
void appendPath(std::string& path1, const std::string& path2)
{
if (path1.back() == PATH_SEPARATOR) {