diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-02-14 12:07:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-14 12:07:30 +0100 |
| commit | 29582ed461b693368ec56567c2e40cfa20ef4bf5 (patch) | |
| tree | 04721b833e8e6108c2e13c4f0ea9f4dc7b2ae946 /Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs | |
| parent | ca6d499680f9fbb369844a11eb0e0213b66bb00b (diff) | |
| parent | 3b6985986709473c69ba785460c702c6bbe3771d (diff) | |
Merge branch 'master' into issue15137
Diffstat (limited to 'Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs')
| -rw-r--r-- | Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs index c69bcfef7..de722332a 100644 --- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs +++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs @@ -107,10 +107,20 @@ namespace Emby.Server.Implementations.AppBase private void CheckOrCreateMarker(string path, string markerName, bool recursive = false) { - var otherMarkers = GetMarkers(path, recursive).FirstOrDefault(e => Path.GetFileName(e) != markerName); + string? otherMarkers = null; + try + { + otherMarkers = GetMarkers(path, recursive).FirstOrDefault(e => !Path.GetFileName(e.AsSpan()).Equals(markerName, StringComparison.OrdinalIgnoreCase)); + } + catch + { + // Error while checking for marker files, assume none exist and keep going + // TODO: add some logging + } + if (otherMarkers is not null) { - throw new InvalidOperationException($"Exepected to find only {markerName} but found marker for {otherMarkers}."); + throw new InvalidOperationException($"Expected to find only {markerName} but found marker for {otherMarkers}."); } var markerPath = Path.Combine(path, markerName); |
