mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix #1276
This commit is contained in:
parent
b1adc3e6e3
commit
22f1a69550
27
Wabbajack.Lib/CompilationSteps/IgnoreExtension.cs
Normal file
27
Wabbajack.Lib/CompilationSteps/IgnoreExtension.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
|
||||
namespace Wabbajack.Lib.CompilationSteps
|
||||
{
|
||||
public class IgnoreExtension : ACompilationStep
|
||||
{
|
||||
private readonly Extension _ext;
|
||||
private readonly string _reason;
|
||||
|
||||
public IgnoreExtension(ACompiler compiler, Extension ext) : base(compiler)
|
||||
{
|
||||
_ext = ext;
|
||||
_reason = $"Ignoring {_ext} files";
|
||||
}
|
||||
|
||||
public override async ValueTask<Directive?> Run(RawSourceFile source)
|
||||
{
|
||||
if (source.Path.Extension != _ext)
|
||||
return null;
|
||||
|
||||
var result = source.EvolveTo<IgnoredDirectly>();
|
||||
result.Reason = _reason;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -479,6 +479,7 @@ namespace Wabbajack.Lib
|
||||
new zEditIntegration.IncludeZEditPatches(this),
|
||||
new IncludeTaggedMods(this, Consts.WABBAJACK_NOMATCH_INCLUDE),
|
||||
new IgnorePathContains(this,@"\Edit Scripts\Export\"),
|
||||
new IgnoreExtension(this, new Extension(".CACHE")),
|
||||
new DropAll(this)
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user