r7945 ($Plugins::current_plugin_folder)

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

r7945 ($Plugins::current_plugin_folder)

#1 Post by EternalHarvest »

http://openkore.svn.sourceforge.net/vie ... threv=7945

$Plugins::current_plugin_folder isn't determined there ("When a plugin is being (re)loaded, the the plugin's folder is set in this variable").

It should also be unset right after a plugin is loaded:

Code: Select all

Index: Plugins.pm
===================================================================
--- Plugins.pm	(revision 7930)
+++ Plugins.pm	(working copy)
@@ -159,6 +159,9 @@
 				Plugin::LoadException->throw("$!");
 			}
 		}
+		
+		undef $current_plugin;
+		undef $current_plugin_folder;
 	}
 }