1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/misc/keepass/keepass-plugins.patch

47 lines
1.5 KiB
Diff
Raw Normal View History

--- old/KeePass/Forms/MainForm.cs
+++ new/KeePass/Forms/MainForm.cs
2016-09-15 21:24:36 +01:00
@@ -386,42 +386,$OUTPUT_LC$ @@ namespace KeePass.Forms
m_pluginManager.UnloadAllPlugins();
2016-09-15 21:24:36 +01: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); }
- }
- }
$DO_LOADS$+ }
// Delete old files *after* loading plugins (when timestamps
// of loaded plugins have been updated already)