FF-1917: updated set working file to support custom names

This commit is contained in:
John Andrews
2024-11-06 08:38:26 +13:00
parent 7b0cf12c79
commit 073c51cbe9

View File

@@ -1,3 +1,4 @@
using System.Text.RegularExpressions;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
@@ -41,6 +42,13 @@ public class SetWorkingFile : Node
args.Logger?.ELog(args.FailureReason);
return -1;
}
if (Regex.IsMatch(file, @"^[\w\d]{2,}:"))
{
// special case eg nc: for next cloud, where the file wont be accessible so we just set it so it appears nicely in the UI but its gone
args.SetWorkingFile(file);
return 1;
}
if (args.FileService.FileExists(file))
{