Skip to content

Commit

Permalink
Fix GoodFilesBaseUrl having an extra /
Browse files Browse the repository at this point in the history
  • Loading branch information
CorruptComputer committed Nov 26, 2023
1 parent 8e04a81 commit fd43113
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UnitystationLauncher/Constants/ApiUrls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion UnitystationLauncher/Services/CodeScanConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fd43113

Please sign in to comment.