28d8f6e18b5c04a6f517bbb05e6a15d80f042dd9 angie Tue May 14 12:34:10 2019 -0700 When saving a session, even if a ctfile or customComposite is already a symlink, scan it anyway in case it is an old session that points to customTrash db tables. refs #22440 diff --git src/hg/hgSession/sessionData.c src/hg/hgSession/sessionData.c index 126e411..6c339e3 100644 --- src/hg/hgSession/sessionData.c +++ src/hg/hgSession/sessionData.c @@ -343,31 +343,31 @@ { struct tempName tn; trashDirFile(&tn, "ct", CT_PREFIX, ".ctfile"); return cloneString(tn.forCgi); } static char *saveTrackFile(struct cart *cart, char *varName, char *oldFile, char *sessionDataDbPrefix, char *dbSuffix, char *sessionDir) /* oldFile contains custom track lines or track collection hub trackDb; scan for trashDir paths * and/or customTrash tables and move files and tables to safe locations per sessionDataDbPrefix and * sessionDir. If oldFile does not exist or has already been saved, return NULL. */ { char *newFile = NULL; if (fileExists(oldFile)) { - if (isTrashPath(oldFile) && !maybeReadlink(oldFile)) + if (isTrashPath(oldFile)) { struct lineFile *lf = lineFileOpen(oldFile, TRUE); if (isNotEmpty(sessionDir)) newFile = sessionDataPathFromTrash(oldFile, sessionDir); else newFile = newCtTrashFile(); if (fileExists(newFile)) errAbort("saveTrackFile: new file '%s' already exists", newFile); makeDirsForFile(newFile); FILE *newF = mustOpen(newFile, "w"); char *line; while (lineFileNext(lf, &line, NULL)) { char *s = skipLeadingSpaces(line); if (*s != '\0' && *s != '#')