diff --git a/DownloadTask.cs b/DownloadTask.cs index f36c45c..0cb27ee 100644 --- a/DownloadTask.cs +++ b/DownloadTask.cs @@ -57,6 +57,7 @@ internal class DownloadTask : IDisposable { private Util.SentryTransaction? Transaction { get; set; } private const double Window = 5; + private const string DefaultFolder = "_default"; internal double BytesPerSecond { get { @@ -690,8 +691,8 @@ private static string[] GetOutputPaths(IReadOnlyCollection> files) return MakePathPartsSafe(outputPath); } - var group = MakeFileNameSafe(file[0] ?? "_default"); - var option = MakeFileNameSafe(file[1] ?? "_default"); + var group = MakeFileNameSafe(file[0] ?? DefaultFolder); + var option = MakeFileNameSafe(file[1] ?? DefaultFolder); var gamePath = MakePathPartsSafe(file[2]!); return Path.Join(group, option, gamePath); @@ -1002,8 +1003,8 @@ private async Task ConstructDefaultMod(IDownloadTask_GetVersion info) { var replacedPath = outputPath == null ? Path.Join( - "_default", - "_default", + DefaultFolder, + DefaultFolder, MakePathPartsSafe(gamePath) ) : MakePathPartsSafe(outputPath); @@ -1115,8 +1116,8 @@ private async Task ConstructGroups(IDownloadTask_GetVersion info) { var pathsMap = new Dictionary>>(); foreach (var (_, files) in info.NeededFiles.Files.Files) { foreach (var file in files) { - var group = file[0] ?? "_default"; - var option = file[1] ?? "_default"; + var group = file[0] ?? DefaultFolder; + var option = file[1] ?? DefaultFolder; var gamePath = file[2]!; var outputPath = file[3];