diff --git a/BasicNodes/File/PatternReplacer.cs b/BasicNodes/File/PatternReplacer.cs
index 57868d32..64a13870 100644
--- a/BasicNodes/File/PatternReplacer.cs
+++ b/BasicNodes/File/PatternReplacer.cs
@@ -33,7 +33,7 @@ public class PatternReplacer : Node
try
{
string filename = new FileInfo(UseWorkingFileName ? args.WorkingFile : args.FileName).Name;
- string updated = RunReplacements(filename);
+ string updated = RunReplacements(args, filename);
if (updated == filename)
{
@@ -69,16 +69,25 @@ public class PatternReplacer : Node
///
/// Run replacements on a filename
///
+ /// The node parameters
/// the filename to replacement
/// the replaced files
- internal string RunReplacements(string filename)
+ internal string RunReplacements(NodeParameters args, string filename)
{
string updated = filename;
foreach(var replacement in Replacements)
{
var value = replacement.Value ?? string.Empty;
if (value == "EMPTY")
+ {
+ args?.Logger?.ILog("Using an EMPTY replacement");
value = string.Empty;
+ }
+ else
+ {
+
+ args?.Logger?.ILog("Using replacement value: \"" + value + "\"");
+ }
try
{
// this might not be a regex, but try it first
diff --git a/BasicNodes/Tests/PatternReplacerTests.cs b/BasicNodes/Tests/PatternReplacerTests.cs
index ddc19347..86218d80 100644
--- a/BasicNodes/Tests/PatternReplacerTests.cs
+++ b/BasicNodes/Tests/PatternReplacerTests.cs
@@ -51,7 +51,7 @@ namespace BasicNodes.Tests
node.UnitTest = true;
var args = new FileFlows.Plugin.NodeParameters(@"c:\test\Seinfeld.h265.mkv", new TestLogger(), false, string.Empty);
- var result = node.RunReplacements(args.WorkingFile);
+ var result = node.RunReplacements(args, args.WorkingFile);
Assert.AreEqual(@"c:\test\Seinfeld.mkv", result);
}
}