зеркало из https://github.com/mozilla/pjs.git
Bug 507405 - Fix filename parsing to handle two-, three- and four-part version strings (NPOTB) - r=bhearsum
This commit is contained in:
Родитель
e358566c3b
Коммит
4eb4471ae3
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче