From bfe6147b2ee55604f8fc1c2bc7e1d418ea1e115e Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Fri, 22 Sep 2023 18:45:13 -0400 Subject: [PATCH] ensure cache directory exists --- SPTInstaller/Helpers/DownloadCacheHelper.cs | 2 ++ SPTInstaller/SPTInstaller.csproj | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SPTInstaller/Helpers/DownloadCacheHelper.cs b/SPTInstaller/Helpers/DownloadCacheHelper.cs index a11a055..819d719 100644 --- a/SPTInstaller/Helpers/DownloadCacheHelper.cs +++ b/SPTInstaller/Helpers/DownloadCacheHelper.cs @@ -72,6 +72,7 @@ public static class DownloadCacheHelper /// If the file exists, it is deleted before downloading public static async Task DownloadFileAsync(string outputFileName, string targetLink, IProgress progress) { + Directory.CreateDirectory(CachePath); var outputFile = new FileInfo(Path.Join(CachePath, outputFileName)); try @@ -109,6 +110,7 @@ public static class DownloadCacheHelper /// If the file exists, it is deleted before downloading public static async Task DownloadFileAsync(string outputFileName, Stream downloadStream) { + Directory.CreateDirectory(CachePath); var outputFile = new FileInfo(Path.Join(CachePath, outputFileName)); try diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index 0951158..c997265 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -9,8 +9,8 @@ icon.ico Assets\icon.ico Debug;Release;TEST - 2.14 - 2.14 + 2.15 + 2.15