* [PATCH 07/07] Close filter only if it was opened.
@ 2015-11-27 20:46 ranger
0 siblings, 0 replies; only message in thread
From: ranger @ 2015-11-27 20:46 UTC (permalink / raw)
---
scan-tree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scan-tree.c b/scan-tree.c
index 7490e74..9909587 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -74,7 +74,8 @@ static char *xstrrchr(char *s, char *from, int c)
return from < s ? NULL : from;
}
-static int open_project_filter(const char *action, const char *repo) {
+static int open_project_filter(const char *action, const char *repo)
+{
return cgit_open_filter(ctx.cfg.project_filter, action, repo,
ctx.env.remote_user ? ctx.env.remote_user : "",
ctx.env.server_name ? ctx.env.server_name : "",
@@ -274,8 +275,7 @@ void scan_projects(const char *path, const char *projectsfile, repo_config_fn fn
void scan_tree(const char *path, repo_config_fn fn)
{
- if (ctx.cfg.project_filter) {
- open_project_filter("init", path);
+ if (ctx.cfg.project_filter && !open_project_filter("init", path)) {
cgit_close_filter(ctx.cfg.project_filter);
}
--
2.1.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-27 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27 20:46 [PATCH 07/07] Close filter only if it was opened ranger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).