aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO
diff options
context:
space:
mode:
authorMBR-0001 <55142207+MBR-0001@users.noreply.github.com>2026-04-18 17:14:31 +0200
committerGitHub <noreply@github.com>2026-04-18 17:14:31 +0200
commita2eff41d6617bed7a7c5518d00f227a2406a8421 (patch)
tree933386669537d5145ca6b3706728454aff27d703 /Emby.Server.Implementations/IO
parentd4a46bc6291560b35a9b64fb88b68019f903d0ef (diff)
parent5aa093d2997d8120ce19037642556070d27ce0bb (diff)
Merge branch 'master' into removeGlobalSubtitleConfiguration
Diffstat (limited to 'Emby.Server.Implementations/IO')
-rw-r--r--Emby.Server.Implementations/IO/LibraryMonitor.cs7
-rw-r--r--Emby.Server.Implementations/IO/ManagedFileSystem.cs13
2 files changed, 18 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs
index d87ad729ee..23bd5cf200 100644
--- a/Emby.Server.Implementations/IO/LibraryMonitor.cs
+++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs
@@ -60,6 +60,7 @@ namespace Emby.Server.Implementations.IO
_fileSystem = fileSystem;
appLifetime.ApplicationStarted.Register(Start);
+ appLifetime.ApplicationStopping.Register(Stop);
}
/// <inheritdoc />
@@ -352,6 +353,12 @@ namespace Emby.Server.Implementations.IO
return;
}
+ var fileInfo = _fileSystem.GetFileSystemInfo(path);
+ if (DotIgnoreIgnoreRule.IsIgnored(fileInfo, null))
+ {
+ return;
+ }
+
// Ignore certain files, If the parent of an ignored path has a change event, ignore that too
foreach (var i in _tempIgnoredPaths.Keys)
{
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
index fad97344b5..4d68cb4444 100644
--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
@@ -497,8 +497,17 @@ namespace Emby.Server.Implementations.IO
/// <inheritdoc />
public virtual bool AreEqual(string path1, string path2)
{
- return Path.TrimEndingDirectorySeparator(path1).Equals(
- Path.TrimEndingDirectorySeparator(path2),
+ if (string.IsNullOrWhiteSpace(path1) || string.IsNullOrWhiteSpace(path2))
+ {
+ return false;
+ }
+
+ var normalized1 = Path.TrimEndingDirectorySeparator(path1);
+ var normalized2 = Path.TrimEndingDirectorySeparator(path2);
+
+ return string.Equals(
+ normalized1,
+ normalized2,
_isEnvironmentCaseInsensitive ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
}