Commit e9d79b13 authored by Sergey Lyubka's avatar Sergey Lyubka Committed by Sergey Lyubka

Add documentation for the mongoose binary

    PUBLISHED_FROM=71a01298c9bbff9a748ea33e0d148d549e5e6437
parent 7951dac9
......@@ -5016,6 +5016,13 @@ static int is_file_hidden(const char *path,
const struct mg_serve_http_opts *opts) {
const char *p1 = opts->per_directory_auth_file;
const char *p2 = opts->hidden_file_pattern;
/* Strip directory path from the file name */
const char *pdir = strrchr(path, DIRSEP);
if (pdir != NULL) {
path = pdir + 1;
}
return !strcmp(path, ".") || !strcmp(path, "..") ||
(p1 != NULL && !strcmp(path, p1)) ||
(p2 != NULL && mg_match_prefix(p2, strlen(p2), path) > 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment