Ticket #7128 (closed Bug: fixed)
Filename Normalizer, when locale=None fails to normalize
| Reported by: | dreamcatcher | Owned by: | hannosch |
|---|---|---|---|
| Priority: | blocker | Milestone: | 3.0.2 |
| Component: | Internationalization | Keywords: | |
| Cc: |
Description
Here's a very cornerish case that needs fixing.
In plone.i18n.normalizer, if the FileNameNormalizer ends up receiving a 'None' for locale, the filename *is* normalized, but then when trying to preserve the extension the wrong variable gets used.
# Preserve filename extensions
base = baseNormalize(text)
ext = ''
m = FILENAME_REGEX.match(text)
if m is not None:
base = m.groups()[0]
ext = m.groups()[1]
I believe that FILENAME_REGEX.match() should receive 'base' not 'text' there, as 'base' contains the normalized filename, but 'text' will contain the original, non-normalized filename if locale=None.
Change History
Note: See
TracTickets for help on using
tickets.

Fixed in r17239.