Fix bug if folder ended in trailing slash
This commit is contained in:
parent
503379079b
commit
71387e94d8
1 changed files with 2 additions and 1 deletions
|
|
@ -18,7 +18,8 @@ namespace FileManager
|
|||
/// <summary>Generate a valid path for this file or directory</summary>
|
||||
public LongPath GetFilePath(bool returnFirstExisting = false)
|
||||
{
|
||||
string fileName = Template;
|
||||
|
||||
string fileName = Template.EndsWith(Path.DirectorySeparatorChar) ? Template[..^1] : Template;
|
||||
List<string> pathParts = new();
|
||||
|
||||
var paramReplacements = ParameterReplacements.ToDictionary(r => $"<{formatKey(r.Key)}>", r => formatValue(r.Value));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue