f832c0f046e1a08ebf9fc1070c0cc11cd1192462 chmalee Wed Dec 21 14:41:59 2022 -0800 Fix database check in hgCustom custom track update procedure by stripping quotes from the new config db setting, refs #3201 diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c index e22d85e..70778a5 100644 --- src/hg/hgCustom/hgCustom.c +++ src/hg/hgCustom/hgCustom.c @@ -1326,30 +1326,32 @@ { addWarning(dsWarn, catch->message->string); } errCatchFree(&catch); /* exclude special setting used by table browser to indicate * db assembly for error-handling purposes only */ char *db = NULL; if (trackConfig && (db = stringIn("db=", trackConfig)) != NULL) { db += 3; char *nextTok = skipToSpaces(db); if (!nextTok) nextTok = strchr(db, 0); db = cloneStringZ(db,nextTok-db); + stripChar(db, '\''); + stripChar(db, '"'); if (!sameString(db,database)) err = "Invalid configuration found - remove db= or return it to its original value. "; } if (cartVarExists(cart, hgCtUpdatedTrack) && !hasData) { /* update custom track config and doc, but not data*/ selectedTable = cartOptionalString(cart, hgCtUpdatedTable); if (selectedTable) { ct = ctFromList(ctList, selectedTable); if (ct) { struct errCatch *catch = errCatchNew(); if (errCatchStart(catch))