Ticket #2327 (new defect) — at Initial Version

Opened 12 years ago

Last modified 12 years ago

Can't put ? into a new name

Reported by: gotar Owned by:
Priority: critical Milestone: 4.7.5
Component: mc-core Version: master
Keywords: Cc: zaytsev
Blocked By: Blocking:
Branch state: Votes for changeset:

Description

It's not possible to rename a file to something having question mark. Literal ? is being replaced with entire pattern just like it was * (an asterisk), despite of documentation saying nothing about ? in target pattern:

"In the target mask only the '*' and '\<digit>' wildcards are allowed"

One more funny effect of this issue is duplication of names having single '?': F6, enter
However it's getting more serious when source file has multiple '?'s: F6, enter -> segfault.
(for the above to happen question marks must not be preceded by *).

The source of this problem is treating ? as * (and not escaping it in default target pattern).

Escaping itself is buggy too: \? or \* are translated to consecutive \1, \2, \3, etc.

Everyting with shell patterns on, as disabling them makes rename impossible, but that's for next ticket.

This ticket may be duplicate, I remembering chasing this issue some time ago but can't find it in trac now, so sorry if it's already reported.

Note: See TracTickets for help on using tickets.