Bug 507405 - Fix filename parsing to handle two-, three- and four-part version strings (NPOTB) - r=bhearsum

This commit is contained in:
Chris Cooper 2009-08-28 16:45:12 -04:00
Родитель e358566c3b
Коммит 4eb4471ae3
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -340,7 +340,7 @@ def decode_filename(filepath):
"""
try:
m = re.search(
'(?P<product>\w+)(-)(?P<version>\w+\.\w+)(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)',
'(?P<product>\w+)(-)(?P<version>\w+\.\w+(\.\w+){0,2})(\.)(?P<locale>.+?)(\.)(?P<platform>.+?)(\.)(?P<type>\w+)(.mar)',
os.path.basename(filepath))
return m.groupdict()
except Exception, exc: