d7a43aac7c80b7dd83228f76c43c6cceb612403a galt Wed Sep 16 19:36:56 2015 -0700 Fixes mayOpen for transparent case when the file does not exist. Do not errAbort, return NULL instead. Hiram ran into this with his wiggle utilities. diff --git src/lib/udc.c src/lib/udc.c index 2f6810d..9a498cd 100644 --- src/lib/udc.c +++ src/lib/udc.c @@ -996,30 +996,32 @@ return NULL; } } } /* Allocate file object and start filling it in. */ struct udcFile *file; AllocVar(file); file->url = cloneString(url); file->protocol = protocol; file->prot = prot; if (isTransparent) { /* If transparent dummy up things so that the "sparse" file pointer is actually * the file itself, which appears to be completely loaded in cache. */ + if (!fileExists(url)) + return NULL; int fd = file->fdSparse = mustOpenFd(url, O_RDONLY); struct stat status; fstat(fd, &status); file->startData = 0; file->endData = file->size = status.st_size; } else { udcPathAndFileNames(file, cacheDir, protocol, afterProtocol); if (!useCacheInfo) { file->updateTime = info.updateTime; file->size = info.size; memcpy(&(file->connInfo), &(info.ci), sizeof(struct connInfo)); // update cache file mod times, so if we're caching we won't do this again