aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/server.c b/server.c
index ab93b16..1688390 100644
--- a/server.c
+++ b/server.c
@@ -791,11 +791,9 @@ open_dir(struct client *c)
struct stat sb;
const char *index;
char path[PATH_MAX];
- size_t len;
int fd = -1;
- len = strlen(c->iri.path);
- if (len > 0 && !ends_with(c->iri.path, "/")) {
+ if (*c->iri.path != '\0' && !ends_with(c->iri.path, "/")) {
redirect_canonical_dir(c);
return;
}