From d53c07f9601817a5a546b8de2ce5c16e76cb9933 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Mon, 30 Nov 2020 18:30:37 +0100 Subject: [PATCH] Increase more readability --- src/client.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index fe86a0e..d6c1e69 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -326,10 +326,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col } type = path->getFileType(); - if (type.find("inode/") == 0) { - req->respond(403); - goto respond; - } else if (path->getRelativeFilePath().find("/.") != string::npos && !noRedirect) { + if (type.find("inode/") == 0 || (path->getRelativeFilePath().find("/.") != string::npos && !noRedirect)) { req->respond(403); goto respond; } @@ -418,7 +415,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col string line; while (!(line = read_line(pipes.stdout)).empty()) { - long pos = line.find(':'); + pos = line.find(':'); string index = line.substr(0, pos); string data = line.substr(pos + 1, line.length() - pos);