[ros-diffs] [navaraf] 33362: Use correct path when loading plugins.

navaraf at svn.reactos.org navaraf at svn.reactos.org
Thu May 8 10:00:36 CEST 2008


Author: navaraf
Date: Thu May  8 03:00:35 2008
New Revision: 33362

URL: http://svn.reactos.org/svn/reactos?rev=33362&view=rev
Log:
Use correct path when loading plugins.

Modified:
    trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs

Modified: trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs?rev=33362&r1=33361&r2=33362&view=diff
==============================================================================
--- trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs [iso-8859-1] (original)
+++ trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs [iso-8859-1] Thu May  8 03:00:35 2008
@@ -18,11 +18,9 @@
         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);
             }
         }
 



More information about the Ros-diffs mailing list