mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
Merge pull request #6572 from dennisreimann/mwb-integration-plugin
Plugins: Convert relative to absolute path when loading a plugin
This commit is contained in:
commit
580518e5aa
1 changed files with 11 additions and 2 deletions
|
@ -125,10 +125,19 @@ namespace BTCPayServer.Plugins
|
||||||
{
|
{
|
||||||
// Formatted either as "<PLUGIN_IDENTIFIER>::<PathToDll>" or "<PathToDll>"
|
// Formatted either as "<PLUGIN_IDENTIFIER>::<PathToDll>" or "<PathToDll>"
|
||||||
var idx = plugin.IndexOf("::");
|
var idx = plugin.IndexOf("::");
|
||||||
|
var filePath = plugin;
|
||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
pluginsToLoad.Add((plugin[0..idx], plugin[(idx + 1)..]));
|
{
|
||||||
|
filePath = plugin[(idx + 1)..];
|
||||||
|
filePath = Path.GetFullPath(filePath);
|
||||||
|
pluginsToLoad.Add((plugin[0..idx], filePath));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
pluginsToLoad.Add((Path.GetFileNameWithoutExtension(plugin), plugin));
|
{
|
||||||
|
filePath = Path.GetFullPath(filePath);
|
||||||
|
|
||||||
|
pluginsToLoad.Add((Path.GetFileNameWithoutExtension(plugin), filePath));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue