Skip to content

Commit

Permalink
Merge pull request #177 from DeepwaterHooligans/pr-sde-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sudorandom authored Jul 25, 2024
2 parents 0af058b + f478294 commit 1aa3024
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions staticdump/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ func FindLastStaticDumpChecksum(client *pester.Client) (string, error) {

switch resp.StatusCode {
case 200, 304:
return string(body), nil
lines := strings.Split(string(body), "\n")
for _, line := range lines {
if strings.Contains(line, "sde.zip") {
parts := strings.Fields(line)
if len(parts) > 0 {
return parts[0], nil
}
}
}
return "", errors.New("Checksum for sde.zip not found")
case 404:
return "", errors.New("Could not find latest static dump checksum (404)")
default:
Expand Down Expand Up @@ -123,14 +132,14 @@ func loadtypes(staticDataPath string) ([]typedb.EveType, error) {
defer r.Close()

var allTypes map[int64]Type
err = loadDataFromZipFile(r, "sde/fsd/typeIDs.yaml", &allTypes)
err = loadDataFromZipFile(r, "fsd/types.yaml", &allTypes)
if err != nil {
return nil, err
}
log.Printf("Loaded %d types", len(allTypes))

var allBlueprints map[int64]Blueprint
err = loadDataFromZipFile(r, "sde/fsd/blueprints.yaml", &allBlueprints)
err = loadDataFromZipFile(r, "fsd/blueprints.yaml", &allBlueprints)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1aa3024

Please sign in to comment.