2015-11-22 18:21:13 +01:00
|
|
|
--- old/KeePass/Forms/MainForm.cs
|
|
|
|
+++ new/KeePass/Forms/MainForm.cs
|
2016-09-15 22:24:36 +02:00
|
|
|
@@ -386,42 +386,$OUTPUT_LC$ @@ namespace KeePass.Forms
|
2015-11-22 18:21:13 +01:00
|
|
|
m_pluginManager.UnloadAllPlugins();
|
2016-09-15 22:24:36 +02:00
|
|
|
if(AppPolicy.Current.Plugins)
|
|
|
|
{
|
|
|
|
- string[] vExclNames = new string[] {
|
|
|
|
- AppDefs.FileNames.Program, AppDefs.FileNames.XmlSerializers,
|
|
|
|
- AppDefs.FileNames.NativeLib32, AppDefs.FileNames.NativeLib64,
|
|
|
|
- AppDefs.FileNames.ShInstUtil
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- string strPlgRoot = UrlUtil.GetFileDirectory(
|
|
|
|
- WinUtil.GetExecutable(), false, true);
|
|
|
|
- m_pluginManager.LoadAllPlugins(strPlgRoot, SearchOption.TopDirectoryOnly,
|
|
|
|
- vExclNames);
|
|
|
|
-
|
|
|
|
- if(!NativeLib.IsUnix())
|
|
|
|
- {
|
|
|
|
- string strPlgSub = UrlUtil.EnsureTerminatingSeparator(strPlgRoot,
|
|
|
|
- false) + AppDefs.PluginsDir;
|
|
|
|
- m_pluginManager.LoadAllPlugins(strPlgSub, SearchOption.AllDirectories,
|
|
|
|
- vExclNames);
|
|
|
|
- }
|
|
|
|
- else // Unix
|
|
|
|
- {
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- DirectoryInfo diPlgRoot = new DirectoryInfo(strPlgRoot);
|
|
|
|
- foreach(DirectoryInfo diSub in diPlgRoot.GetDirectories())
|
|
|
|
- {
|
|
|
|
- if(diSub == null) { Debug.Assert(false); continue; }
|
|
|
|
-
|
|
|
|
- if(string.Equals(diSub.Name, AppDefs.PluginsDir,
|
|
|
|
- StrUtil.CaseIgnoreCmp))
|
|
|
|
- m_pluginManager.LoadAllPlugins(diSub.FullName,
|
|
|
|
- SearchOption.AllDirectories, vExclNames);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- catch(Exception) { Debug.Assert(false); }
|
|
|
|
- }
|
|
|
|
- }
|
2015-11-22 18:21:13 +01:00
|
|
|
$DO_LOADS$+ }
|
|
|
|
|
|
|
|
// Delete old files *after* loading plugins (when timestamps
|
|
|
|
// of loaded plugins have been updated already)
|