From 973292e888198da3c1a54ee854fe85b0dd3307ed Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 23 Aug 2024 20:57:39 -0400 Subject: [PATCH] fix: make file names safe in groups --- DownloadTask.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/DownloadTask.cs b/DownloadTask.cs index a5122a2..2cdf740 100644 --- a/DownloadTask.cs +++ b/DownloadTask.cs @@ -810,11 +810,6 @@ private void RemoveOldFiles() { this.State = State.RemovingOldFiles; this.SetStateData(0, 0); - Plugin.Log.Info("expected files:"); - foreach (var exp in this.ExpectedFiles) { - Plugin.Log.Info($" {exp}"); - } - // find old, normal files no longer being used to remove var filesPath = Path.Join(this.PenumbraModPath, "files"); @@ -825,11 +820,6 @@ private void RemoveOldFiles() { .Select(path => path.ToLowerInvariant()) .ToHashSet(); - Plugin.Log.Info("present files:"); - foreach (var exp in presentFiles) { - Plugin.Log.Info($" {exp}"); - } - // remove the files that we expect from the list of already-existing // files - these are the files to remove now presentFiles.ExceptWith(this.ExpectedFiles); @@ -1022,8 +1012,8 @@ private static string GetReplacedPath(List file) { var replacedPath = outputPath == null ? Path.Join( - file[0] ?? DefaultFolder, - file[1] ?? DefaultFolder, + MakeFileNameSafe(file[0] ?? DefaultFolder), + MakeFileNameSafe(file[1] ?? DefaultFolder), MakePathPartsSafe(gamePath) ) : MakePathPartsSafe(outputPath);