e341c576504ab46af7ad7d7a28cd4f81369e0fea
braney
  Mon Sep 1 11:18:57 2025 -0700
working to get quickLifts from genark hubs to work

diff --git src/hg/lib/asmAlias.c src/hg/lib/asmAlias.c
index e4b7e2347d1..e990499be66 100644
--- src/hg/lib/asmAlias.c
+++ src/hg/lib/asmAlias.c
@@ -1,25 +1,26 @@
 /* asmAlias.c was originally generated by the autoSql program, which also 
  * generated asmAlias.h and asmAlias.sql.  This module links the database and
  * the RAM representation of objects. */
 
 #include "common.h"
 #include "linefile.h"
 #include "dystring.h"
 #include "jksql.h"
 #include "hdb.h"
 #include "asmAlias.h"
+#include "trackHub.h"
 
 
 
 char *asmAliasCommaSepFieldNames = "alias,browser";
 
 void asmAliasStaticLoad(char **row, struct asmAlias *ret)
 /* Load a row from asmAlias table into ret.  The contents of ret will
  * be replaced at the next call to this function. */
 {
 
 ret->alias = row[0];
 ret->browser = row[1];
 }
 
 struct asmAlias *asmAliasLoadByQuery(struct sqlConnection *conn, char *query)
@@ -155,34 +156,34 @@
 fputc(sep,f);
 if (sep == ',') fputc('"',f);
 fprintf(f, "%s", el->browser);
 if (sep == ',') fputc('"',f);
 fputc(lastSep,f);
 }
 
 /* -------------------------------- End autoSql Generated Code -------------------------------- */
 
 char *asmAliasFind(char *alias)
 /* If this assembly is an alias for a db we know about, return it.  Otherwise return what we were sent. */
 {
 if (alias == NULL)
     return NULL;
 
-char *ret = alias;
+char *ret = cloneString(alias);
 struct sqlConnection *centralConn = hConnectCentral();
 
 if (!sqlTableExists(centralConn, "asmAlias"))
     {
     hDisconnectCentral(&centralConn);
     return alias;
     }
 
 char buffer[4096];
 
-sqlSafef(buffer, sizeof buffer, "select * from asmAlias where alias='%s' limit 1", alias);
+sqlSafef(buffer, sizeof buffer, "select * from asmAlias where alias='%s' limit 1", trackHubSkipHubName(alias));
 struct asmAlias *asmAlias = asmAliasLoadByQuery(centralConn, buffer);
 hDisconnectCentral(&centralConn);
 if (asmAlias)
     ret = asmAlias->browser;
 
 return ret;
 }