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
parent d80fec6ac6
commit 0ecd200643

View File

@ -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: