Skip to content

Commit

Permalink
fix LoadCDNIndices
Browse files Browse the repository at this point in the history
  • Loading branch information
ZingBallyhoo committed Nov 16, 2024
1 parent 597251a commit ccfda80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TACTLib/Client/ClientHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public ClientHandler(string? basePath, ClientCreateArgs createArgs) {
ConfigHandler = ConfigHandler.ForDynamicContainer(this);
}

if (CreateArgs.Online && createArgs.LoadCDNIndices) {
if (CreateArgs.Online) {
if (CanShareCDNData(CreateArgs.TryShareCDNIndexWithHandler)) {
CDNIndex = CreateArgs.TryShareCDNIndexWithHandler.CDNIndex;
} else {
Expand Down
6 changes: 6 additions & 0 deletions TACTLib/Protocol/CDNIndexHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ private CDNIndexHandler(ClientHandler client)
// return;
//}

if (!client.CreateArgs.LoadCDNIndices)
{
// we could download a million indices and that's quite expensive...
// only loose files will be available
return;
}
for (var index = 0; index < client.ConfigHandler.CDNConfig.Archives.Count; index++)
{
string archive = client.ConfigHandler.CDNConfig.Archives[index];
Expand Down

0 comments on commit ccfda80

Please sign in to comment.