aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Plugins/BasePluginOfT.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2021-09-06 13:42:48 +0900
committerdkanada <dkanada@users.noreply.github.com>2021-09-06 13:42:48 +0900
commitf6c0db4bb5007182d79ceb809675b90909fd1fa0 (patch)
treeab13e60d0cba2477585a6d0ec601f10ad9f112b2 /MediaBrowser.Common/Plugins/BasePluginOfT.cs
parent776ce7c660a6d6bf975766378d6db7124f4ac232 (diff)
parente9508616cc90c01a22ca28c13694587dd16b49d6 (diff)
merge branch 'master' into syncplay-sessions-fix
Diffstat (limited to 'MediaBrowser.Common/Plugins/BasePluginOfT.cs')
-rw-r--r--MediaBrowser.Common/Plugins/BasePluginOfT.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/MediaBrowser.Common/Plugins/BasePluginOfT.cs b/MediaBrowser.Common/Plugins/BasePluginOfT.cs
index 99c226f50..afda83a7c 100644
--- a/MediaBrowser.Common/Plugins/BasePluginOfT.cs
+++ b/MediaBrowser.Common/Plugins/BasePluginOfT.cs
@@ -1,4 +1,6 @@
+#nullable disable
#pragma warning disable SA1649 // File name should match first type name
+
using System;
using System.IO;
using System.Runtime.InteropServices;
@@ -45,10 +47,10 @@ namespace MediaBrowser.Common.Plugins
var assemblyFilePath = assembly.Location;
var dataFolderPath = Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(assemblyFilePath));
- if (!Directory.Exists(dataFolderPath) && Version != null)
+ if (Version != null && !Directory.Exists(dataFolderPath))
{
// Try again with the version number appended to the folder name.
- dataFolderPath = dataFolderPath + "_" + Version.ToString();
+ dataFolderPath += "_" + Version.ToString();
}
SetAttributes(assemblyFilePath, dataFolderPath, assemblyName.Version);
@@ -105,10 +107,7 @@ namespace MediaBrowser.Common.Plugins
{
lock (_configurationSyncLock)
{
- if (_configuration == null)
- {
- _configuration = LoadConfiguration();
- }
+ _configuration ??= LoadConfiguration();
}
}