fixed a bug where mapupdated plugins would not get unloaded on deletion
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40456
This commit is contained in:
parent
4ad7f36207
commit
6908858807
@ -478,7 +478,6 @@ time_t CPlugin::GetFileTimeStamp()
|
|||||||
if (stat(path, &s) != 0)
|
if (stat(path, &s) != 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
g_Logger.LogError("Could not obtain plugin time stamp, error: %d", errno);
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return s.st_mtime;
|
return s.st_mtime;
|
||||||
@ -1625,12 +1624,8 @@ void CPluginManager::ReloadOrUnloadPlugins()
|
|||||||
{
|
{
|
||||||
UnloadPlugin((IPlugin *)pl);
|
UnloadPlugin((IPlugin *)pl);
|
||||||
} else if (pl->GetType() == PluginType_MapUpdated) {
|
} else if (pl->GetType() == PluginType_MapUpdated) {
|
||||||
t=pl->GetFileTimeStamp();
|
t = pl->GetFileTimeStamp();
|
||||||
if (!t)
|
if (!t || t > pl->GetTimeStamp())
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (t > pl->GetTimeStamp())
|
|
||||||
{
|
{
|
||||||
pl->SetTimeStamp(t);
|
pl->SetTimeStamp(t);
|
||||||
UnloadPlugin((IPlugin *)pl);
|
UnloadPlugin((IPlugin *)pl);
|
||||||
|
Loading…
Reference in New Issue
Block a user