upload_system_symbols: Fix sym-upload-v2 when uploading dumped symbols

This was previously setting the right upload servers too late to
use them when uploading previously dumped symbols (the
`--upload-from` use case)

Bug: 1400770
Change-Id: If5bb749707b9f0a181585619f30ec9cb011db5ed
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4111102
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
Leonard Grey 2022-12-15 17:11:01 -05:00
parent 63af0cd752
commit 80430d73ae

View file

@ -113,6 +113,11 @@ func main() {
flag.Parse()
log.SetFlags(0)
// If `apiKey` is set, we're using the v2 protocol.
if len(*apiKey) > 0 {
uploadServers = uploadServersV2
}
var uq *UploadQueue
if *uploadOnlyPath != "" {
@ -149,10 +154,6 @@ func main() {
defer os.RemoveAll(p)
}
}
// If `apiKey` is set, we're using the v2 protocol.
if len(*apiKey) > 0 {
uploadServers = uploadServersV2
}
dq := StartDumpQueue(*systemRoot, dumpPath, uq)
dq.Wait()