ef98cc65cd9626157087f5ad3dd6eac5012c50d8 galt Thu Jan 24 18:13:10 2013 -0800 Add ability to tolerate paths in .2bit filename with gfServer. Paths are removed leaving only the filename. Clients are on other machines and therefore cannnot use them in general. diff --git src/gfServer/gfServer.c src/gfServer/gfServer.c index 53c87c0..067cbc6 100644 --- src/gfServer/gfServer.c +++ src/gfServer/gfServer.c @@ -516,30 +516,38 @@ uglyf("starting translated server...\n"); logInfo("setting up translated index"); gfIndexTransNibsAndTwoBits(transGf, fileCount, seqFiles, minMatch, maxGap, tileSize, repMatch, NULL, allowOneMismatch, doMask, stepSize); } else { uglyf("starting untranslated server...\n"); logInfo("setting up untranslated index"); gf = gfIndexNibsAndTwoBits(fileCount, seqFiles, minMatch, maxGap, tileSize, repMatch, NULL, allowOneMismatch, stepSize); } logInfo("indexing complete"); +/* Strip path off of file names since they are of no use to clients that are on other machines */ +int i; +for (i=0; i<fileCount; ++i) + { + seqFiles[i] = getFileNameOnly(seqFiles[i]); + } + + /* Set up socket. Get ready to listen to it. */ socketHandle = netAcceptingSocket(port, 100); if (socketHandle < 0) errAbort("Fatal Error: Unable to open listening socket on port %d.", port); logInfo("Server ready for queries!"); printf("Server ready for queries!\n"); int connectFailCount = 0; for (;;) { ZeroVar(&fromAddr); fromLen = sizeof(fromAddr); connectionHandle = accept(socketHandle, (struct sockaddr*)&fromAddr, &fromLen); if (connectionHandle < 0) {