mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 02:13:50 +01:00
Fix gitignore-style not working properly on windows. (#15487)
This commit is contained in:
parent
2e5ced5098
commit
435bb14bb2
1 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
|
|
@ -88,6 +89,13 @@ public class DotIgnoreIgnoreRule : IResolverIgnoreRule
|
|||
var ignore = new Ignore.Ignore();
|
||||
ignore.Add(ignoreRules);
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Mitigate the problem of the Ignore library not handling Windows paths correctly.
|
||||
// See https://github.com/jellyfin/jellyfin/issues/15484
|
||||
return ignore.IsIgnored(fileInfo.FullName.NormalizePath('/'));
|
||||
}
|
||||
|
||||
return ignore.IsIgnored(fileInfo.FullName);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue