mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
Add documentation for the mongoose binary
PUBLISHED_FROM=71a01298c9bbff9a748ea33e0d148d549e5e6437
This commit is contained in:
1 parent
7951dac9d5
commit
e9d79b130d
1 file changed
+7
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user