From 4892d943d770fec73761d87522c22df6870b3320 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 3 Sep 2024 12:29:25 -0400 Subject: [PATCH] fix: create directories after multiple install check --- DownloadTask.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DownloadTask.cs b/DownloadTask.cs index 188a9ef..b37b25f 100644 --- a/DownloadTask.cs +++ b/DownloadTask.cs @@ -1,5 +1,4 @@ using System.Collections.Concurrent; -using System.Collections.Immutable; using System.Diagnostics; using System.Net.Http.Headers; using System.Security; @@ -168,6 +167,7 @@ private async Task Run() { this.VariantName = info.Variant.Name; this.GenerateModDirectoryPath(info); this.DetermineIfUpdate(info); + this.CreateDirectories(); await this.TestHardLinks(); await this.HashExistingFiles(); await this.DownloadFiles(info); @@ -296,6 +296,9 @@ private async Task GetPackageInfo() { private void GenerateModDirectoryPath(IDownloadTask_GetVersion info) { var dirName = HeliosphereMeta.ModDirectoryName(info.Variant.Package.Id, info.Variant.Package.Name, info.Version, info.Variant.Id); this.PenumbraModPath = Path.Join(this.ModDirectory, dirName); + } + + private void CreateDirectories() { this.FilesPath = Path.GetFullPath(Path.Join(this.PenumbraModPath, "files")); this.HashesPath = Path.GetFullPath(Path.Join(this.PenumbraModPath, ".hs-hashes"));