Fixed plugin loading

Moved all office interop types in their own file.
This commit is contained in:
Krom, Robertus 2020-02-18 15:10:37 +01:00
parent 80d8f51fc5
commit bef29df3db
125 changed files with 1628 additions and 1373 deletions

View file

@ -21,6 +21,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@ -171,8 +172,9 @@ namespace Greenshot.Helpers {
if (!Directory.Exists(path)) return pluginFiles;
try
{
pluginFiles = Directory.GetFiles(path, "*Plugin.dll", SearchOption.AllDirectories);
pluginFiles = Directory.GetFiles(path, "*Plugin.dll", SearchOption.AllDirectories)
// Skip the GreenshotPlugin.dll itself
.Where(p => CultureInfo.CurrentCulture.CompareInfo.IndexOf(p, "GreenshotPlugin.dll", CompareOptions.IgnoreCase) < 0);
} catch (Exception ex) {
Log.Error("Error loading plugin: ", ex);
}