FF-154 - added tests and updated to work with noextension change

This commit is contained in:
John Andrews
2022-08-09 12:22:48 +12:00
parent e6813b8e23
commit 6a4a7bdb9d
5 changed files with 151 additions and 36 deletions

View File

@@ -107,7 +107,12 @@ namespace FileFlows.BasicNodes.File
if(string.IsNullOrEmpty(DestinationFile) == false)
{
string destFile = args.ReplaceVariables(DestinationFile);
// FF-154 - changed file.Name and file.Orig.Filename to be the full short filename including the extension
string destFile = DestinationFile;
destFile = destFile.Replace("{file.Orig.FileName}{file.Orig.Extension}", "{file.Orig.FileName}");
destFile = destFile.Replace("{file.Name}{file.Extension}", "{file.Name}");
destFile = destFile.Replace("{file.Name}{ext}", "{file.Name}");
destFile = args.ReplaceVariables(destFile);
dest = Path.Combine(destDir!, destFile);
}
args.Logger.ILog($"CopyFile.Dest[6] '{dest}'");