46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
--- old/KeePass/Forms/MainForm.cs
|
|
+++ new/KeePass/Forms/MainForm.cs
|
|
@@ -386,42 +386,$OUTPUT_LC$ @@ namespace KeePass.Forms
|
|
m_pluginManager.UnloadAllPlugins();
|
|
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); }
|
|
- }
|
|
- }
|
|
$DO_LOADS$+ }
|
|
|
|
// Delete old files *after* loading plugins (when timestamps
|
|
// of loaded plugins have been updated already)
|