2ff16ea7f45495b41e16bb1ae2257d6eb40051ae
chmalee
  Mon Aug 25 11:11:09 2025 -0700
Woops still want to return the input string if the mount point doesn't exist, no refs

diff --git src/hg/lib/userdata.c src/hg/lib/userdata.c
index 08f07d9771c..a951b1c60a2 100644
--- src/hg/lib/userdata.c
+++ src/hg/lib/userdata.c
@@ -100,31 +100,31 @@
 {
 if (!dataDir)
     setDataDir(userName);
 
 return dataDir;
 }
 
 char *swapDataDir(char *userName, char *in)
 /* Try replacing the current dataDir with what is defined in hg.conf:tusdMountPoint as
  * the data server may be somewhere else and mounted over NFS. In this case, when
  * tusd saves files, it is writing it's local tusdDataDir value into the hgcentral
  * file location. When the CGI running somewhere else needs to verify file existence,
  * the tusdDataDir won't exist on the CGI filesystem, but will instead be mounted as some
  * different path.  In this case, replace tusdDataDir with tusdMountPoint */
 {
-char *ret = NULL;
+char *ret = cloneString(in);
 char *tusdDataDir = cfgOption("tusdDataDir");
 char *tusdMountPoint = cfgOption("tusdMountPoint");
 if (tusdMountPoint && !isEmpty(tusdMountPoint))
     {
     ret = replaceChars(in, tusdDataDir, tusdMountPoint);
     }
 return ret;
 }
 
 char *stripDataDir(char *fname, char *userName)
 /* Strips the getDataDir(userName) off of fname. The dataDir may be a symbolic
  * link, or on a different filesystem. */
 {
 getDataDir(userName);
 if (!dataDir)