Plugin: Fixed error when using forward slash in Plugin=

This commit is contained in:
Birunthan Mohanathas 2012-06-04 17:41:06 +03:00
parent 1fece1e4d8
commit 74ffb0a9d1

View File

@ -118,7 +118,7 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section)
const std::wstring& plugin = parser.ReadString(section, L"Plugin", L""); const std::wstring& plugin = parser.ReadString(section, L"Plugin", L"");
std::wstring pluginFile = Rainmeter->GetPluginPath(); std::wstring pluginFile = Rainmeter->GetPluginPath();
size_t pos = plugin.rfind(L'\\'); size_t pos = plugin.find_last_of(L"\\/");
if (pos != std::wstring::npos) if (pos != std::wstring::npos)
{ {
pluginFile.append(plugin, pos, plugin.length() - pos); pluginFile.append(plugin, pos, plugin.length() - pos);