e52b9728905070e9979662928bccd604db61d8f4 angie Thu Mar 23 00:16:08 2017 +0000 Commit 6072cb04b (#18445) introduced a bug: when hReplaceGbdb changes a path into a URL, fileExists() is no longer a sufficient test. Using hDbDbNibPath was unnecessarily complicated -- we have standardized on /gbdb/$db/$db.2bit for 2bit files. fixes #19113 diff --git src/hg/lib/hAnno.c src/hg/lib/hAnno.c index faccabd..02f5540 100644 --- src/hg/lib/hAnno.c +++ src/hg/lib/hAnno.c @@ -31,42 +31,33 @@ //#*** duplicated in hgVarAnnoGrator and annoGratorTester struct annoAssembly *hAnnoGetAssembly(char *db) /* Make annoAssembly for db. */ { static struct annoAssembly *aa = NULL; if (aa == NULL) { if (trackHubDatabase(db)) { struct trackHubGenome *thg = trackHubGetGenome(db); char *url = thg->twoBitPath; aa = annoAssemblyNew(db, url); } else { - char *nibOrTwoBitDir = hDbDbNibPath(db); - if (nibOrTwoBitDir == NULL) - errAbort("Can't find .2bit for db '%s'", db); char twoBitPath[HDB_MAX_PATH_STRING]; - safef(twoBitPath, sizeof(twoBitPath), "%s/%s.2bit", nibOrTwoBitDir, db); + safef(twoBitPath, sizeof(twoBitPath), "/gbdb/%s/%s.2bit", db, db); char *path = hReplaceGbdb(twoBitPath); - if (!fileExists(path)) - { - // if 2bit file isn't in nibOrTwoBitDir, try up one directory - safef(twoBitPath, sizeof(twoBitPath), "%s/../%s.2bit", nibOrTwoBitDir, db); - path = hReplaceGbdb(twoBitPath); - } aa = annoAssemblyNew(db, path); freeMem(path); } } return aa; } static boolean columnsMatch(struct asObject *asObj, struct sqlFieldInfo *fieldList) /* Return TRUE if asObj's column names match the given SQL fields. */ { if (asObj == NULL) return FALSE; struct sqlFieldInfo *firstRealField = fieldList; if (sameString("bin", fieldList->field) && differentString("bin", asObj->columnList->name)) firstRealField = fieldList->next;