6093365dc43da304b632706394a77a1713965635 braney Tue Oct 24 12:58:59 2023 -0700 stop checking for data accessibility on the assumption that the trackDb build already did that. Add a little side-effect up higher in the call chain. This should probably be somewhere else, but in fear of breaking something new, I'm just popping it up one link in the call chain. diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 36ea25a..c062d9e 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -3924,57 +3924,61 @@ { bigDataUrl = replaceChars(bigDataUrl, "$D", database); char *bigDataUrlLocal = hReplaceGbdb(bigDataUrl); if (hasProtocol(bigDataUrlLocal)) return TRUE; else { if (gbdbHash == NULL) return fileExists(bigDataUrlLocal); else return hashLookup(gbdbHash, bigDataUrlLocal) != NULL; } } else { - // we now allow references to native tracks in track hubs - tdb->table = trackHubSkipHubName(tdb->table); - // if it's copied from a custom track, wait to find data later if (isCustomTrack(tdb->table)) return TRUE; return (hTableForTrack(database, tdb->table) != NULL); } } boolean trackDataAccessible(char *database, struct trackDb *tdb) /* Return TRUE if underlying data are accessible - meaning the track has either * a bigDataUrl with remote URL (http:// etc), a bigDataUrl with an existing local file, * or a database table with the same name. * Note: this returns FALSE for composite tracks; use this on subtracks or simple tracks. */ { return trackDataAccessibleHash(database, tdb, NULL); } static void addTrackIfDataAccessible(char *database, struct trackDb *tdb, boolean privateHost, struct trackDb **tdbRetList) /* check if a trackDb entry should be included in display, and if so * add it to the list, otherwise free it */ { -if ((!tdb->private || privateHost) && trackDataAccessible(database, tdb)) +if ((!tdb->private || privateHost)) + { + // we now allow references to native tracks in track hubs (for track collections) + // so we need to give the downstream code the table name if there is no bigDataUrl. + char *bigDataUrl = trackDbSetting(tdb, "bigDataUrl"); + if (bigDataUrl == NULL) + tdb->table = trackHubSkipHubName(tdb->table); slAddHead(tdbRetList, tdb); + } else if (tdbIsDownloadsOnly(tdb)) { // While it would be good to make table NULL, since we should support tracks // without tables (composties, etc) and even data tracks without tables (bigWigs). // However, some CGIs still need careful bullet-proofing. I have done so with // hgTrackUi, hgTracks, hgTable and hgGenome //if (tdb->table != NULL && sameString(tdb->table,tdb->track)) // tdb->table = NULL; slAddHead(tdbRetList, tdb); } else trackDbFree(&tdb); } #ifdef UNUSED