From 6908858807415cb638439e835d551f454a837486 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 7 Feb 2007 19:34:58 +0000 Subject: [PATCH] fixed a bug where mapupdated plugins would not get unloaded on deletion --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40456 --- core/systems/PluginSys.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/systems/PluginSys.cpp b/core/systems/PluginSys.cpp index 95cded30..d941ef0e 100644 --- a/core/systems/PluginSys.cpp +++ b/core/systems/PluginSys.cpp @@ -478,7 +478,6 @@ time_t CPlugin::GetFileTimeStamp() if (stat(path, &s) != 0) #endif { - g_Logger.LogError("Could not obtain plugin time stamp, error: %d", errno); return 0; } else { return s.st_mtime; @@ -1625,12 +1624,8 @@ void CPluginManager::ReloadOrUnloadPlugins() { UnloadPlugin((IPlugin *)pl); } else if (pl->GetType() == PluginType_MapUpdated) { - t=pl->GetFileTimeStamp(); - if (!t) - { - continue; - } - if (t > pl->GetTimeStamp()) + t = pl->GetFileTimeStamp(); + if (!t || t > pl->GetTimeStamp()) { pl->SetTimeStamp(t); UnloadPlugin((IPlugin *)pl);