Minor LibraryMonitor improvements

* Enable nullable
* Add a fast return to ReportFileSystemChanged when path should be ignored
* Use Span overloads of Path.* functions where possible
* IFileSystem: remove NormalizePath as Path.TrimEndingDirectorySeparator already checks if it's a root path
This commit is contained in:
Bond_009
2023-09-13 17:30:50 +02:00
parent 3f19befc59
commit 767a42fbdb
8 changed files with 44 additions and 75 deletions

View File

@@ -608,7 +608,7 @@ namespace Emby.Server.Implementations.Library
var originalList = paths.ToList();
var list = originalList.Where(i => i.IsDirectory)
.Select(i => _fileSystem.NormalizePath(i.FullName))
.Select(i => Path.TrimEndingDirectorySeparator(i.FullName))
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToList();