mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-22 10:55:15 -04:00
Fix incorrect replace order
This commit is contained in:
parent
67b31c5f68
commit
506bc0176b
1 changed files with 19 additions and 21 deletions
|
@ -91,11 +91,10 @@ public partial record ExportRequest
|
||||||
Snowflake? before = null)
|
Snowflake? before = null)
|
||||||
{
|
{
|
||||||
// Format path
|
// Format path
|
||||||
var actualOutputPath = PathEx.EscapeFileName(
|
var actualOutputPath = Regex.Replace(
|
||||||
Regex.Replace(
|
|
||||||
outputPath,
|
outputPath,
|
||||||
"%.",
|
"%.",
|
||||||
m => m.Value switch
|
m => PathEx.EscapeFileName(m.Value switch
|
||||||
{
|
{
|
||||||
"%g" => guild.Id.ToString(),
|
"%g" => guild.Id.ToString(),
|
||||||
"%G" => guild.Name,
|
"%G" => guild.Name,
|
||||||
|
@ -110,8 +109,7 @@ public partial record ExportRequest
|
||||||
"%d" => DateTimeOffset.Now.ToString("yyyy-MM-dd"),
|
"%d" => DateTimeOffset.Now.ToString("yyyy-MM-dd"),
|
||||||
"%%" => "%",
|
"%%" => "%",
|
||||||
_ => m.Value
|
_ => m.Value
|
||||||
}
|
})
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Output is a directory
|
// Output is a directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue