Add documentation for the mongoose binary

PUBLISHED_FROM=71a01298c9bbff9a748ea33e0d148d549e5e6437
This commit is contained in:
Sergey Lyubka authored and Sergey Lyubka committed 2015-11-30 12:27:59 +00:00
1 parent 7951dac9d5
commit e9d79b130d
1 file changed
+7
+7
View File
@@ -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);