mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 22:18:24 +00:00
Fix incorrect replace order
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user