Fix incorrect replace order

pull/986/head
Tyrrrz 2 years ago
parent 67b31c5f68
commit 506bc0176b

@ -91,11 +91,10 @@ public partial record ExportRequest
Snowflake? before = null)
{
// Format path
var actualOutputPath = PathEx.EscapeFileName(
Regex.Replace(
var actualOutputPath = Regex.Replace(
outputPath,
"%.",
m => m.Value switch
m => PathEx.EscapeFileName(m.Value switch
{
"%g" => guild.Id.ToString(),
"%G" => guild.Name,
@ -110,8 +109,7 @@ public partial record ExportRequest
"%d" => DateTimeOffset.Now.ToString("yyyy-MM-dd"),
"%%" => "%",
_ => m.Value
}
)
})
);
// Output is a directory

Loading…
Cancel
Save