dirplex: Fixed dotfile-checking typo.
[ashd.git] / src / dirplex / dirplex.c
index d5aabea..162e4fd 100644 (file)
@@ -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);