about summary refs log tree commit diff
path: root/pkgs/applications/misc/keepass/keepass-plugins.patch
blob: 1793f04a1708f67114ccf61c62a5ff3310e11c44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- 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)