diff --git a/Source/FileManager/FileNamingTemplate.cs b/Source/FileManager/FileNamingTemplate.cs index ae9b92c7..1f472b6d 100644 --- a/Source/FileManager/FileNamingTemplate.cs +++ b/Source/FileManager/FileNamingTemplate.cs @@ -18,7 +18,8 @@ namespace FileManager /// Generate a valid path for this file or directory public LongPath GetFilePath(bool returnFirstExisting = false) { - string fileName = Template; + + string fileName = Template.EndsWith(Path.DirectorySeparatorChar) ? Template[..^1] : Template; List pathParts = new(); var paramReplacements = ParameterReplacements.ToDictionary(r => $"<{formatKey(r.Key)}>", r => formatValue(r.Value));