Use correct path when loading plugins.
authorFilip Navara <filip.navara@gmail.com>
Thu, 8 May 2008 08:00:35 +0000 (08:00 +0000)
committerFilip Navara <filip.navara@gmail.com>
Thu, 8 May 2008 08:00:35 +0000 (08:00 +0000)
svn path=/trunk/; revision=33362

irc/TechBot/TechBot.Library/Factory/CommandFactory.cs

index 34e3471..b140c18 100644 (file)
@@ -18,11 +18,9 @@ namespace TechBot.Library
         public static void LoadPlugins()
         {
             //get the file names of the dll files in the current directory.
         public static void LoadPlugins()
         {
             //get the file names of the dll files in the current directory.
-            FileInfo objExeInfo = new FileInfo(@"C:\Ros\current\irc\TechBot\TechBot.Console\bin\Debug\");
-
-            foreach (FileInfo objInfo in objExeInfo.Directory.GetFiles("*.dll"))
+            foreach (string fileName in Directory.GetFiles(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "*.dll"))
             {
             {
-                LoadPluginsFromDLLFile(objInfo.FullName);
+                LoadPluginsFromDLLFile(fileName);
             }
         }
 
             }
         }