fe875492a7da5c0f64cd9c6d43cd6809478ec2a4
markd
  Sat May 9 08:32:48 2026 -0700
*.bai and *.tbi index files were by-passing UDC and being downloaded to  current directory

diff --git src/lib/vcf.c src/lib/vcf.c
index eadb50c2372..c2800efef96 100644
--- src/lib/vcf.c
+++ src/lib/vcf.c
@@ -1149,34 +1149,34 @@
         }
     }
 
 return slCount(vcff->records) - oldCount;
 }
 
 long long vcfTabixItemCount(char *fileOrUrl, char *tbiFileOrUrl)
 /* Return the total number of items across all sequences in fileOrUrl, using index file.
  * If tbiFileOrUrl is NULL, the index file is assumed to be fileOrUrl.tbi.
  * NOTE: not all tabix index files include mapped item counts, so this may return 0 even for
  * large files. */
 {
 long long itemCount = 0;
 hts_idx_t *idx = NULL;
 if (isNotEmpty(tbiFileOrUrl))
-    idx = hts_idx_load2(fileOrUrl, tbiFileOrUrl);
+    idx = hts_idx_load3(fileOrUrl, tbiFileOrUrl, HTS_FMT_TBI, 0);
 else
     {
-    idx = hts_idx_load(fileOrUrl, HTS_FMT_TBI);
+    idx = hts_idx_load3(fileOrUrl, NULL, HTS_FMT_TBI, 0);
     }
 if (idx == NULL)
     warn("vcfTabixItemCount: hts_idx_load(%s) failed.", tbiFileOrUrl ? tbiFileOrUrl : fileOrUrl);
 else
     {
     int tCount;
     const char **seqNames = tbx_seqnames((tbx_t *)idx, &tCount);
     int tid;
     for (tid = 0;  tid < tCount;  tid++)
         {
         uint64_t mapped, unmapped;
         int ret = hts_idx_get_stat(idx, tid, &mapped, &unmapped);
         if (ret == 0)
             itemCount += mapped;
         // ret is -1 if counts are unavailable.