Fix bug if folder ended in trailing slash
This commit is contained in:
parent
503379079b
commit
71387e94d8
@ -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…
x
Reference in New Issue
Block a user