1eae44289e73a7f19aa794d5037d1c4f47d5ae31 max Tue Oct 31 04:06:20 2023 -0700 changes after code review, refs #32498, thanks to Braney diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 8b65764..5b5b732 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -1459,34 +1459,37 @@ if (fileName == NULL) return fileName; // if the gbdbLoc1/gbdbLoc2 system is not used at all, like on the RR, do nothing and stop now. // This is important, as we would be doing tens of thousands of stats // otherwise on the RR when we parse trackDb char* newGbdbLoc1 = cfgOption("gbdbLoc1"); char* newGbdbLoc2 = cfgOption("gbdbLoc2"); if ((newGbdbLoc1 == NULL && newGbdbLoc2==NULL) || !startsWith("/gbdb/", fileName)) return cloneString(fileName); char *path = hReplaceGbdbLocal(fileName); if (fileExists(path)) return path; +if (newGbdbLoc2!=NULL) + { freeMem(path); path = replaceChars(fileName, "/gbdb/", newGbdbLoc2); if (cfgOptionBooleanDefault("traceGbdb", FALSE)) fprintf(stderr, "REDIRECT gbdbLoc2 %s ", path); + } return path; } char *hReplaceGbdbSeqDir(char *path, char *db) /* similar to hReplaceGbdb, but accepts a nib or 2bit "directory" (basename) under * gbdb, like /gbdb/hg19 (which by jkLib is translated to /gbdb/hg19/hg19.2bit). hReplaceGbdb would check only if the dir exists. For 2bit basename, we have to check if the 2bit file exists, do the rewriting, then strip off the 2bit filename again. This function works with .nib directories, but nib does not support opening from URLs. As of Feb 2014, only hg16 and anoGam1 have no .2bit file. */ { char buf[4096];