diff --git a/UnitystationLauncher/Constants/ApiUrls.cs b/UnitystationLauncher/Constants/ApiUrls.cs index f3f5959..b45dac1 100644 --- a/UnitystationLauncher/Constants/ApiUrls.cs +++ b/UnitystationLauncher/Constants/ApiUrls.cs @@ -13,7 +13,7 @@ public static class ApiUrls public const string LatestBlogPosts = $"{ChangelogBaseUrl}/posts/?format=json"; private const string CdnBaseUrl = "https://unitystationfile.b-cdn.net"; - public const string GoodFilesBaseUrl = $"{CdnBaseUrl}/GoodFiles/"; + public const string GoodFilesBaseUrl = $"{CdnBaseUrl}/GoodFiles"; public const string AllowedGoodFilesUrl = $"{GoodFilesBaseUrl}/AllowGoodFiles.json"; private const string RawGitHubFileBaseUrl = "https://raw.githubusercontent.com/unitystation/unitystation/develop"; diff --git a/UnitystationLauncher/Services/CodeScanConfigService.cs b/UnitystationLauncher/Services/CodeScanConfigService.cs index 79f20af..348c810 100644 --- a/UnitystationLauncher/Services/CodeScanConfigService.cs +++ b/UnitystationLauncher/Services/CodeScanConfigService.cs @@ -52,7 +52,7 @@ public CodeScanConfigService(HttpClient httpClient, IPreferencesService preferen if (Directory.Exists(versionPath) == false) { string zipExtractPath = Path.Combine(pathBase, version); - HttpResponseMessage request = await _httpClient.GetAsync(ApiUrls.GoodFilesBaseUrl + version + "/" + folderName + ".zip", HttpCompletionOption.ResponseHeadersRead); + HttpResponseMessage request = await _httpClient.GetAsync($"{ApiUrls.GoodFilesBaseUrl}/{version}/{folderName}.zip", HttpCompletionOption.ResponseHeadersRead); await using Stream responseStream = await request.Content.ReadAsStreamAsync(); ZipArchive archive = new(responseStream); archive.ExtractToDirectory(zipExtractPath, true);