Reverted r815 and stopped changing the working directory for the plugins.

This commit is contained in:
spx
2011-05-23 20:21:19 +00:00
parent 7ae737fc0f
commit 31e3091e34
5 changed files with 22 additions and 48 deletions

View File

@ -68,15 +68,6 @@ bool CMeasurePlugin::Update()
{
if (!CMeasure::PreUpdate()) return false;
bool bulkUpdating = (m_MeterWindow && m_MeterWindow->IsBulkUpdating());
if (!bulkUpdating)
{
std::wstring dir = Rainmeter->GetSkinPath();
if (m_MeterWindow) dir += m_MeterWindow->GetSkinName();
CSystem::SetWorkingDirectory(dir);
}
if (UpdateFunc)
{
// Update the plugin
@ -88,10 +79,8 @@ bool CMeasurePlugin::Update()
m_Value = UpdateFunc2(m_ID);
}
if (!bulkUpdating)
{
CSystem::ResetWorkingDirectory();
}
// Reset to default
CSystem::ResetWorkingDirectory();
return PostUpdate();
}
@ -186,13 +175,11 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section)
// Remove current directory from DLL search path
SetDllDirectory(L"");
std::wstring dir = Rainmeter->GetSkinPath();
if (m_MeterWindow) dir += m_MeterWindow->GetSkinName();
CSystem::SetWorkingDirectory(dir);
double maxValue;
maxValue = InitializeFunc(m_Plugin, parser.GetFilename().c_str(), section, m_ID);
// Reset to default
SetDllDirectory(L"");
CSystem::ResetWorkingDirectory();
std::wstring szMaxValue = parser.ReadString(section, L"MaxValue", L"NotSet");