mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
PCRE 2 - fix check for filter match
Kind contribution from uno20001: https://old.reddit.com/r/C_Programming/comments/etavho/file_manager_nnn_needs_help_with_pcre/fffk4wr/
This commit is contained in:
parent
196c09ab9b
commit
e5ad7d81ff
|
@ -1902,7 +1902,7 @@ static int setfilter(regex_t *regex, const char *filter)
|
||||||
static int visible_re(const fltrexp_t *fltrexp, const char *fname)
|
static int visible_re(const fltrexp_t *fltrexp, const char *fname)
|
||||||
{
|
{
|
||||||
#ifdef PCRE
|
#ifdef PCRE
|
||||||
return pcre_exec(fltrexp->pcrex, NULL, fname, strlen(fname), 0, 0, NULL, 0);
|
return pcre_exec(fltrexp->pcrex, NULL, fname, strlen(fname), 0, 0, NULL, 0) == 0;
|
||||||
#else
|
#else
|
||||||
return regexec(fltrexp->regex, fname, 0, NULL, 0) == 0;
|
return regexec(fltrexp->regex, fname, 0, NULL, 0) == 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue