From c731d02965f8fbca93321f90d952b45469b23cf3 Mon Sep 17 00:00:00 2001 From: reven Date: Mon, 31 Jan 2022 22:51:55 +1300 Subject: [PATCH] renamer now cleaning the paths to remove special characters --- BasicNodes/File/Renamer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BasicNodes/File/Renamer.cs b/BasicNodes/File/Renamer.cs index 7612c314..e524eed6 100644 --- a/BasicNodes/File/Renamer.cs +++ b/BasicNodes/File/Renamer.cs @@ -52,7 +52,7 @@ newFile = newFile.Replace('\\', Path.DirectorySeparatorChar); newFile = newFile.Replace('/', Path.DirectorySeparatorChar); - newFile = args.ReplaceVariables(newFile, stripMissing: true); + newFile = args.ReplaceVariables(newFile, stripMissing: true, cleanSpecialCharacters: true); newFile = Regex.Replace(newFile, @"\.(\.[\w\d]+)$", "$1"); // remove empty [], (), {} newFile = newFile.Replace("()", "").Replace("{}", "").Replace("[]", ""); @@ -62,7 +62,7 @@ newFile = Regex.Replace(newFile, @"\s(\.[\w\d]+)$", "$1"); newFile = newFile.Replace(" \\", "\\"); - string destFolder = args.ReplaceVariables(DestinationPath ?? string.Empty, stripMissing: true); + string destFolder = args.ReplaceVariables(DestinationPath ?? string.Empty, stripMissing: true, cleanSpecialCharacters: true); if (string.IsNullOrEmpty(destFolder)) destFolder = new FileInfo(args.WorkingFile).Directory?.FullName ?? "";