d8e35c06509da9ae47bc0064f22427600844a4f3 chmalee Wed Apr 2 14:15:26 2025 -0700 Fix cancel button not doing anything on file metadata editor, fix hub.txt upload to not create duplicate mysql rows, fix hub.txt upload to not create duplicate data-table ui rows, fix hub default name generator to not choke if a hub startsWith the default hub name but is not immediately followed by a number, refs #35383 diff --git src/hg/hgHubConnect/hooks/pre-finish.c src/hg/hgHubConnect/hooks/pre-finish.c index d70c4612af2..b988ad22454 100644 --- src/hg/hgHubConnect/hooks/pre-finish.c +++ src/hg/hgHubConnect/hooks/pre-finish.c @@ -173,31 +173,31 @@ if (exitStatus == 0) { // create a hub for this upload, which can be edited later struct hubSpace *row = NULL; AllocVar(row); row->userName = userName; row->fileName = fileName; row->fileSize = fileSize; row->fileType = fileType; row->creationTime = NULL; // automatically handled by mysql row->lastModified = sqlUnixTimeToDate(&lastModified, TRUE); row->db = db; row->location = location; row->md5sum = md5HexForFile(row->location); row->parentDir = encodedParentDir ? encodedParentDir : ""; - if (!isHubToolsUpload) + if (!isHubToolsUpload && !(sameString(fileName, "hub.txt"))) { createNewTempHubForUpload(reqId, row, userDataDir, encodedParentDir); fprintf(stderr, "added hub.txt and hubSpace row for hub for file: '%s'\n", fileName); fflush(stderr); } // first make the parentDir rows makeParentDirRows(row->userName, sqlDateToUnixTime(row->lastModified), row->db, row->parentDir, userDataDir); row->parentDir = hubNameFromPath(encodedParentDir); addHubSpaceRowForFile(row); fprintf(stderr, "added hubSpace row for file '%s'\n", fileName); fflush(stderr); } } if (errCatch->gotError) {