Fix edge case regarding package restoration

Exception is thrown if the Downloads folder does not exist when trying to restore the original version of a modded file

Addresses #3308
This commit is contained in:
pizzaboxer 2024-10-27 17:15:41 +00:00
parent 637af71299
commit 59bcf6fd27
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -1053,6 +1053,8 @@ namespace Bloxstrap
if (_cancelTokenSource.IsCancellationRequested) if (_cancelTokenSource.IsCancellationRequested)
return; return;
Directory.CreateDirectory(Paths.Downloads);
string packageUrl = Deployment.GetLocation($"/{_latestVersionGuid}-{package.Name}"); string packageUrl = Deployment.GetLocation($"/{_latestVersionGuid}-{package.Name}");
string robloxPackageLocation = Path.Combine(Paths.LocalAppData, "Roblox", "Downloads", package.Signature); string robloxPackageLocation = Path.Combine(Paths.LocalAppData, "Roblox", "Downloads", package.Signature);