diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-12-15 18:25:36 +0100 |
|---|---|---|
| committer | Cody Robibero (Rebase PR Action) <cody@robibe.ro> | 2021-12-27 14:20:05 +0000 |
| commit | ea8f40e84a72ab1eb0bdbe4974cb78f7d1b0f552 (patch) | |
| tree | ae88958599f260ea1d7e586c6a47931a5fe62f6b /Emby.Server.Implementations/IO | |
| parent | 4441513ca4a64fdf61541e56cbb1091e7aa0395b (diff) | |
More cleanup
Diffstat (limited to 'Emby.Server.Implementations/IO')
| -rw-r--r-- | Emby.Server.Implementations/IO/FileRefresher.cs | 7 | ||||
| -rw-r--r-- | Emby.Server.Implementations/IO/LibraryMonitor.cs | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/IO/ManagedFileSystem.cs | 10 |
3 files changed, 7 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs index e62361c1e..6326208f7 100644 --- a/Emby.Server.Implementations/IO/FileRefresher.cs +++ b/Emby.Server.Implementations/IO/FileRefresher.cs @@ -217,8 +217,13 @@ namespace Emby.Server.Implementations.IO /// <inheritdoc /> public void Dispose() { - _disposed = true; + if (_disposed) + { + return; + } + DisposeTimer(); + _disposed = true; GC.SuppressFinalize(this); } } diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 9fcc7fe59..657daac3f 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -99,7 +99,7 @@ namespace Emby.Server.Implementations.IO // But if we make this delay too high, we risk missing legitimate changes, such as user adding a new file, or hand-editing metadata await Task.Delay(45000).ConfigureAwait(false); - _tempIgnoredPaths.TryRemove(path, out var val); + _tempIgnoredPaths.TryRemove(path, out _); if (refreshPath) { diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 777cd2cd4..5c86dbbb7 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -544,16 +544,6 @@ namespace Emby.Server.Implementations.IO /// <inheritdoc /> public virtual bool AreEqual(string path1, string path2) { - if (path1 == null && path2 == null) - { - return true; - } - - if (path1 == null || path2 == null) - { - return false; - } - return string.Equals( NormalizePath(path1), NormalizePath(path2), |
