diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-15 17:32:06 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-08-15 17:32:27 +0530 |
commit | 5fa16dbd1525e2b476b28291ff55473007d9c1e6 (patch) | |
tree | 83a713bdaf36e9cf516c79922be7a77f32f0aff3 /src/nnn.c | |
parent | 7d672411bbcf2358a330fa541c8fe3b6134cbe53 (diff) | |
download | nnn-5fa16dbd1525e2b476b28291ff55473007d9c1e6.tar.gz |
Force accurate regex match
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -663,7 +663,7 @@ static const char * const patterns[] = { "sed -i 's|^\\(\\(.*/\\)\\(.*\\)$\\)|#\\1\\n\\3|' %s", "sed 's|^\\([^#/][^/]\\?.*\\)$|%s/\\1|;s|^#\\(/.*\\)$|\\1|' " "%s | tr '\\n' '\\0' | xargs -0 -n2 sh -c '%s \"$0\" \"$@\" < /dev/tty'", - "(bz|bz2|gz|tar|taz|tbz|tbz2|tgz|z|zip)$", + "\\.(bz|bz2|gz|tar|taz|tbz|tbz2|tgz|z|zip)$", "sed -i 's|^%s\\(.*\\)$|%s\\1|' %s", }; @@ -5975,8 +5975,6 @@ nochange: /* Get the extension for regext match */ tmp = xextension(pent->name, pent->nlen - 1); - if (tmp) - ++tmp; #ifdef PCRE if (tmp && !pcre_exec(archive_pcre, NULL, tmp, pent->nlen - (tmp - pent->name) - 1, 0, 0, NULL, 0)) { |