a5b4143cce3c9d49ab4c0e0175b7f36320583d94
braney
  Mon Mar 10 08:35:22 2025 -0700
ongoing work on quickLift

diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index e19a7606de7..8ce9a1cdc0b 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -1496,48 +1496,50 @@
 static char *getHubName(struct cart *cart, char *db)
 // get the name of the hub to use for quickLifted tracks
 {
 struct tempName hubTn;
 char buffer[4096];
 #define quickLiftCartName     "hubQuickLift"
 safef(buffer, sizeof buffer, "%s-%s", quickLiftCartName, db);
 char *hubName = cartOptionalString(cart, buffer);
 int fd = -1;
 
 if ((hubName == NULL) || ((fd = open(hubName, 0)) < 0))
     {
     trashDirDateFile(&hubTn, "quickLift", "hub", ".txt");
     hubName = cloneString(hubTn.forCgi);
     cartSetString(cart, buffer, hubName);
-    FILE *f = mustOpen(hubName, "a");
+    }
+
+FILE *f = mustOpen(hubName, "w");
 outHubHeader(f, db);
 fclose(f);
-    }
 
 if (fd >= 0)
     close(fd);
 
 return hubName;
 }
 
 static void dumpTdbAndChildren(struct dyString *dy, struct trackDb *tdb)
 /* Put a trackDb entry into a dyString, stepping up the tree for some variables. */
 {
 struct hashCookie cookie = hashFirst(tdb->settingsHash);
 struct hashEl *hel;
 while ((hel = hashNext(&cookie)) != NULL)
     {   
+    if (differentString(hel->name, "track"))
         dyStringPrintf(dy, "%s %s\n", hel->name, (char *)hel->val);
     }
 
 if (tdb->subtracks)
         {
         for (tdb = tdb->subtracks; tdb; tdb = tdb->next)
             {
             dyStringPrintf(dy, "\ntrack %s\nquickLifted on\navoidHandler on\n", trackHubSkipHubName(tdb->track));
             dumpTdbAndChildren(dy, tdb);
             }
         }
 }
 
 static bool subtrackEnabledInTdb(struct trackDb *subTdb)
 /* Return TRUE unless the subtrack was declared with "subTrack ... off". */