ensure cache directory exists

This commit is contained in:
IsWaffle 2023-09-22 18:45:13 -04:00
parent 84acb45cb7
commit bfe6147b2e
2 changed files with 4 additions and 2 deletions

View File

@ -72,6 +72,7 @@ public static class DownloadCacheHelper
/// <remarks>If the file exists, it is deleted before downloading</remarks>
public static async Task<FileInfo?> DownloadFileAsync(string outputFileName, string targetLink, IProgress<double> progress)
{
Directory.CreateDirectory(CachePath);
var outputFile = new FileInfo(Path.Join(CachePath, outputFileName));
try
@ -109,6 +110,7 @@ public static class DownloadCacheHelper
/// <remarks>If the file exists, it is deleted before downloading</remarks>
public static async Task<FileInfo?> DownloadFileAsync(string outputFileName, Stream downloadStream)
{
Directory.CreateDirectory(CachePath);
var outputFile = new FileInfo(Path.Join(CachePath, outputFileName));
try

View File

@ -9,8 +9,8 @@
<PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.14</AssemblyVersion>
<FileVersion>2.14</FileVersion>
<AssemblyVersion>2.15</AssemblyVersion>
<FileVersion>2.15</FileVersion>
</PropertyGroup>
<ItemGroup>