Commit b69f4877 authored by Bartek Górny's avatar Bartek Górny

bugfix - regex in _makeFile was bad and conversion to graphic formats failed...

bugfix - regex in _makeFile was bad and conversion to graphic formats failed if there was only one page

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13470 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7adbd8c3
No related merge requests found
......@@ -107,7 +107,7 @@ class PDFDocument(File, ConversionCacheMixin):
z = zipfile.ZipFile(f, 'a')
for fname in glob.glob(to.replace('.', '*')):
base = os.path.basename(fname)
pg = re.match('.*(\d+)\.'+format, base).groups()
pg = re.match('.*?(\d*)\.'+format, base).groups()
if pg:
pg = pg[0]
arcname = '%s/page-%s.%s' % (format, pg, format)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment