Ticket #4534 (closed defect: invalid) — at Version 3

Opened 7 months ago

Last modified 7 months ago

mc.ext.ini conversion - incorrect escaping in the Regex section

Reported by: fedy Owned by:
Priority: minor Milestone:
Component: mc-config-ini Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by andrew_b) (diff)

It looks like in mc version 4.8.31 the mc.ext.ini file's Regex= expressions needs double escaping of the special characters (like .)

For example for mp4 videos the (auto generated) default is:

[mp4]
Regex=\\.(mp4|m4v|mpe?g)$

Probably as a result of an automatic conversion of this file from previous format I ended up with a config where the . in Regexes are prepended with just a single \. That result in most setting using Regex just not working. Newly generated mc.ext.ini contains double escaped Regexes like above and works just fine, but all previous user customization are lost.

Not sure if the need for double escaping was intended, but there seems to be a mismatch between the currently required format and the format produced by the conversion.

Change History

comment:1 Changed 7 months ago by fedy

Correction - example again (codeblock):

[mp4]
Regex=\\.(mp4|m4v|mpe?g)$
RegexIgnoreCase=true
Include=video

comment:2 in reply to: ↑ description Changed 7 months ago by andrew_b

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone Future Releases deleted

Replying to fedy:

It looks like in mc version 4.8.31 the mc.ext.ini file's Regex= expressions needs double escaping of the special characters (like .)

Correct. This is already done in #4502.

Probably as a result of an automatic conversion of this file from previous format

mc doesn't provide any automatic conversion for this file.

comment:3 Changed 7 months ago by andrew_b

  • Description modified (diff)
Note: See TracTickets for help on using tickets.