Ticket #3728 (closed defect: invalid)
Viewer doesn't work for files called *.foo.html
Reported by: | drolevar | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | mc-config-ini | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
In a version compiled with GLib search viewer doesn't show the files named like
somefile.foo.htm or
somefile.foo.html
If the regex is changed from \.html?$ to \.html{0,1}$ everything starts working again.
Attachments
Change History
comment:1 Changed 8 years ago by zaytsev
This doesn't seem to make any sense to me, the two regexps should be completely equivalent. Moreover, test.foo.html containing <h1>123</h1> is shown as html just fine for me, as well as test.foo.htm, test.html and test.htm. I can't reproduce the problem for which this is supposed to be a fix...
comment:2 Changed 8 years ago by drolevar
Could you please check whether your MC is built with libpcre or is using regex from GLib?
I use a build shipped with Ubuntu 16.04. I guess it's built without libpcre.
For me it's clear: without the change, as shipped, it doesn't work, with the change it does work.
Might be strange handling of the ? symbol on the GLib regex library.
comment:3 Changed 8 years ago by zaytsev
My ./configure says:
Search type: glib-regexp
What does "it doesn't work" mean more exactly? Does the same hold for other sections, like djvu?
comment:4 Changed 8 years ago by and
Can't confirm.
1) Compiled mc with pcre (8.38) support
Search type: pcre
2) patched ext.d/web.sh for debugging
3) open file by hit ENTER
web.sh reports:
open html /tmp/somefile.foo.htm
open html /tmp/somefile.foo.html
open html /tmp/test.htm
open html /tmp/test.html
4) view file by hit F3
web.sh reports:
view html /tmp/somefile.foo.htm
view html /tmp/somefile.foo.html
view html /tmp/test.htm
view html /tmp/test.html
Same with glib-regexp (glib 2.48.2 compiled with --with-pcre=system)
Search type: glib-regexp # ldd /usr/lib64/libglib-2.0.so | grep pcre libpcre.so.1 => /lib64/libpcre.so.1