Cosmetics

This commit is contained in:
Birunthan Mohanathas
2012-06-17 18:36:59 +03:00
parent d7fb5f4bb5
commit 1e66d1a3c2
3 changed files with 8 additions and 9 deletions

View File

@ -129,12 +129,14 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section)
}
// First try from program path
std::wstring pluginFile = Rainmeter->GetPluginPath() + pluginName;
std::wstring pluginFile = Rainmeter->GetPluginPath();
pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
if (!m_Plugin)
{
// Try from settings path
pluginFile = Rainmeter->GetUserPluginPath() + pluginName;
pluginFile = Rainmeter->GetUserPluginPath();
pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
if (!m_Plugin)
{

View File

@ -884,12 +884,9 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
m_SkinPath.assign(buffer, len);
ExpandEnvironmentVariables(m_SkinPath);
if (!m_SkinPath.empty())
if (!m_SkinPath.empty() && !CSystem::IsPathSeparator(m_SkinPath[m_SkinPath.length() - 1]))
{
if (!CSystem::IsPathSeparator(m_SkinPath[m_SkinPath.length() - 1]))
{
m_SkinPath += L'\\';
}
m_SkinPath += L'\\';
}
}
else if (bDefaultIniLocation &&