X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdirplex%2Fdirplex.c;h=162e4fd9dd1200796afb213d0e24c3925ef52b2c;hb=c3542a659906fa29cdae781e0f5c560595cc6cba;hp=d5aabea141c4253a351c73e984738f18c28eaaa5;hpb=578ad6b1de34230e8fe64116b16380c1441ef9dd;p=ashd.git diff --git a/src/dirplex/dirplex.c b/src/dirplex/dirplex.c index d5aabea..162e4fd 100644 --- a/src/dirplex/dirplex.c +++ b/src/dirplex/dirplex.c @@ -185,7 +185,7 @@ static int checkentry(struct hthead *req, int fd, char *path, char *rest, char * char *newpath; int rv; - if(!el == '.') { + if(*el == '.') { simpleerror(fd, 404, "Not Found", "The requested URL has no corresponding resource."); return(1); } @@ -280,7 +280,8 @@ static int checkpath(struct hthead *req, int fd, char *path, char *rest) if(!*el) { replrest(req, rest); handledir(req, fd, path); - return(1); + rv = 1; + goto out; } rv = checkentry(req, fd, path, rest, el);